]> www.infradead.org Git - users/jedix/linux-maple.git/commit
btrfs: use a single variable to track return value at btrfs_page_mkwrite()
authorFilipe Manana <fdmanana@suse.com>
Wed, 14 May 2025 11:24:25 +0000 (12:24 +0100)
committerDavid Sterba <dsterba@suse.com>
Thu, 15 May 2025 16:24:44 +0000 (18:24 +0200)
commit1ce06d45d92242ffd9c576b736e1e755531fe6dd
treeb495182a3c569a17fec71691424e10779d335e3d
parentd8cddf2a1d71ab9dea59822ccb9bbb780f50ce0a
btrfs: use a single variable to track return value at btrfs_page_mkwrite()

We have two variables to track return values, ret and ret2, with types
vm_fault_t (an unsigned int type) and int, which makes it a bit confusing
and harder to keep track. So use a single variable, of type int, and under
the 'out' label return vmf_error(ret) in case ret contains an error,
otherwise return VM_FAULT_NOPAGE. This is equivalent to what we had before
and it's simpler.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/file.c