btrfs: Return offset from find_desired_extent
authorNikolay Borisov <nborisov@suse.com>
Fri, 27 Sep 2019 10:23:18 +0000 (13:23 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 18 Nov 2019 11:47:00 +0000 (12:47 +0100)
commitbc80230e0e7bc779cd553c2326ea5b3a5bac303b
treede85f0acbee7fffa6e28d8d156b57f61889d46dd
parent2034f3b470ccfd4103737cf4d2a25a52ce9ad002
btrfs: Return offset from find_desired_extent

Instead of using an input pointer parameter as the return value and have
an int as the return type of find_desired_extent, rework the function to
directly return the found offset. Doing that the 'ret' variable in
btrfs_llseek_file can be removed. Additional (subjective) benefit is
that btrfs' llseek function now resemebles those of the other major
filesystems.

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/file.c