]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: correct try_lock_extent() usage in read_extent_buffer_subpage()
authorGoldwyn Rodrigues <rgoldwyn@suse.de>
Thu, 8 Apr 2021 12:40:25 +0000 (07:40 -0500)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Jun 2021 13:19:04 +0000 (15:19 +0200)
commit7bdaa3fff5a61e393e7d72056d163426fcde4a5c
tree8e74d80f25cb3f87a0214de0fae7c728fed6a4fa
parentc6de18cbc82363742b3e5ae9084ce57f72e214f0
btrfs: correct try_lock_extent() usage in read_extent_buffer_subpage()

try_lock_extent() returns 1 on success or 0 for failure and not an error
code. If try_lock_extent() fails, read_extent_buffer_subpage() returns
zero indicating subpage extent read success.

Return EAGAIN/EWOULDBLOCK if try_lock_extent() fails in locking the
extent.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Goldwyn Rodrigues <rgoldwyn@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c