summaryrefslogtreecommitdiff
path: root/tools/include/linux
diff options
context:
space:
mode:
authorDaan De Meyer <daan@amutable.com>2026-07-13 09:50:42 +0200
committerDavid Sterba <dsterba@suse.com>2026-07-14 07:05:10 +0200
commit75a41e3e51eb0d6f7a4969c5056298c2aa3e85f2 (patch)
tree55b8ea7ebae5e5eb37dbd1daac728b358c31b178 /tools/include/linux
parent6a8269b6459ed870a8156c106a0f597383907872 (diff)
downloadlinux-75a41e3e51eb0d6f7a4969c5056298c2aa3e85f2.tar.gz
linux-75a41e3e51eb0d6f7a4969c5056298c2aa3e85f2.zip
btrfs: fix GET_SUBVOL_INFO after compat refactor
btrfs_search_slot() returns a positive value when the search key does not exactly match an item. This is expected here, since offset 0 is used to find the first ROOT_BACKREF for the subvolume and the actual key has the parent root ID as its offset. Before the compat ioctl refactoring, the native handler still copied the filled structure to userspace when the search returned 1. After the lookup was moved to a shared helper, both native and compat callers treat the positive return value as a failure and skip copy_to_user(), leaving BTRFS_IOC_GET_SUBVOL_INFO unusable for non-top-level subvolumes. Reset ret after successfully validating and reading the ROOT_BACKREF so the helper reports success and both callers copy the result to userspace. Fixes: 538e5bdbc899 ("btrfs: add 32-bit compat ioctl for BTRFS_IOC_GET_SUBVOL_INFO") Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: Daan De Meyer <daan@amutable.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'tools/include/linux')
0 files changed, 0 insertions, 0 deletions