aboutsummaryrefslogtreecommitdiff
path: root/fs/btrfs/tests
diff options
context:
space:
mode:
authorQu Wenruo <wqu@suse.com>2021-09-27 15:22:06 +0800
committerDavid Sterba <dsterba@suse.com>2021-10-26 19:08:05 +0200
commit164674a76b25da9c9ea2759eeaa8ef6f1b4ad6c8 (patch)
treed10ceb772d8374acd62ae0dcbacc8c94c1684549 /fs/btrfs/tests
parente55a0de185726ca43e8a31d363ad73c4f0a6770b (diff)
btrfs: handle page locking in btrfs_page_end_writer_lock with no writers
There are several call sites of extent_clear_unlock_delalloc() which get @locked_page = NULL. So that extent_clear_unlock_delalloc() will try to call process_one_page() to unlock every page even the first page is not locked by btrfs_page_start_writer_lock(). This will trigger an ASSERT() in btrfs_subpage_end_and_test_writer() as previously we require every page passed to btrfs_subpage_end_and_test_writer() to be locked by btrfs_page_start_writer_lock(). But compression path doesn't go that way. Thankfully it's not hard to distinguish page locked by lock_page() and btrfs_page_start_writer_lock(). So do the check in btrfs_subpage_end_and_test_writer() so now it can handle both cases well. Signed-off-by: Qu Wenruo <wqu@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/tests')
0 files changed, 0 insertions, 0 deletions