]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
btrfs: only clear EXTENT_LOCK bit in extent_invalidatepage
authorQu Wenruo <wqu@suse.com>
Fri, 13 Nov 2020 12:51:39 +0000 (20:51 +0800)
committerDavid Sterba <dsterba@suse.com>
Tue, 8 Dec 2020 14:54:14 +0000 (15:54 +0100)
commit829ddec922e51ad2740f16646ce701314d9aa509
tree53e21317ab055dc4efba995a39c691a92741435b
parent8e1dc982ed5fa52596504054a0713bf5acbe19f0
btrfs: only clear EXTENT_LOCK bit in extent_invalidatepage

extent_invalidatepage() will try to clear all possible bits since it's
calling clear_extent_bit() with delete == 1.

This is currently fine, since for btree io tree, it only utilizes
EXTENT_LOCK bit.  But this could be a problem for later subpage support,
which will utilize extra io tree bit to represent additional info.

This patch will just convert that clear_extent_bit() to
unlock_extent_cached().

For current code since only EXTENT_LOCKED bit is utilized, this doesn't
change the behavior, but provides a much cleaner basis for incoming
subpage support.

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