diff options
author | Boris Burkov <boris@bur.io> | 2024-07-31 22:41:06 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2024-09-10 17:51:17 +0300 |
commit | f8e9f4a76df65222764c947a1b166ceebb1256dd (patch) | |
tree | 162ea56b47acd08b21d3521a7419e4b9088263f5 /lib/is_single_threaded.c | |
parent | 68a505bb87f948f72e5d230dfd7b40debdb195ed (diff) | |
download | linux-f8e9f4a76df65222764c947a1b166ceebb1256dd.tar.xz |
btrfs: add comment about locking in cow_file_range_inline()
Add a comment to document the complicated locked_page unlock logic in
cow_file_range_inline. The specifically tricky part is that a caller
just up the stack converts ret == 0 to ret == 1 and then another
caller far up the callstack handles ret == 1 as a success, AND returns
without cleanup in that case, both of which "feel" unnatural and led to
the original bug.
Try to document that somewhat specific callstack logic here to explain
the weird un-setting of locked_folio on success.
Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Boris Burkov <boris@bur.io>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'lib/is_single_threaded.c')
0 files changed, 0 insertions, 0 deletions