]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: assert page mapping lock in attach_extent_buffer_page
authorQu Wenruo <wqu@suse.com>
Wed, 21 Oct 2020 06:25:02 +0000 (14:25 +0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 8 Dec 2020 14:54:03 +0000 (15:54 +0100)
commit3322fb018ad3d6e14062c8c6e118706055c1149a
tree399f4b6cb21317b8b92180af2deab5716cc7e0b9
parentb16111e162e9575f75ca5a26b1376f629cd4cf85
btrfs: assert page mapping lock in attach_extent_buffer_page

When calling attach_extent_buffer_page(), either we're attaching
anonymous pages, called from btrfs_clone_extent_buffer(),
or we're attaching btree inode pages, called from alloc_extent_buffer().

For the latter case, we should hold page->mapping->private_lock to avoid
parallel changes to page->private.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c