diff options
author | Qu Wenruo <wqu@suse.com> | 2024-08-30 09:18:20 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2024-09-10 16:51:22 +0200 |
commit | ab6eac7c9111b75fca243e2590a17b55e96e9d31 (patch) | |
tree | 365e041dfd22a69aa9fcb25f802d4fba82072844 /fs/btrfs/extent_io.c | |
parent | btrfs: constify more pointer parameters (diff) | |
download | linux-ab6eac7c9111b75fca243e2590a17b55e96e9d31.tar.xz linux-ab6eac7c9111b75fca243e2590a17b55e96e9d31.zip |
btrfs: remove btrfs_folio_end_all_writers()
The function btrfs_folio_end_all_writers() is only utilized in
extent_writepage() as a way to unlock all subpage range (for both
successful submission and error handling).
Meanwhile we have a similar function, btrfs_folio_end_writer_lock().
The difference is, btrfs_folio_end_writer_lock() expects a range that is
a subset of the already locked range.
This limit on btrfs_folio_end_writer_lock() is a little overkilled,
preventing it from being utilized for error paths.
So here we enhance btrfs_folio_end_writer_lock() to accept a superset of
the locked range, and only end the locked subset.
This means we can replace btrfs_folio_end_all_writers() with
btrfs_folio_end_writer_lock() instead.
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-rw-r--r-- | fs/btrfs/extent_io.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index c07930986fe5..485d88f9947b 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -1466,7 +1466,8 @@ done: mapping_set_error(folio->mapping, ret); } - btrfs_folio_end_all_writers(inode_to_fs_info(inode), folio); + btrfs_folio_end_writer_lock(inode_to_fs_info(inode), folio, + page_start, PAGE_SIZE); ASSERT(ret <= 0); return ret; } |