btrfs: stop using lock_extent in btrfs_buffer_uptodate
authorChristoph Hellwig <hch@lst.de>
Wed, 3 May 2023 15:24:39 +0000 (17:24 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Jun 2023 11:59:28 +0000 (13:59 +0200)
commit9e2aff90fc2ad2b94933762f5442fef9ee7a692e
treee718a14d843eec116d6675e3355e32e62f8d59a5
parentf3d315eb9372868bce92e7b24f2b92e061fe6fcd
btrfs: stop using lock_extent in btrfs_buffer_uptodate

The only other place that locks extents on the btree inode is
read_extent_buffer_subpage while reading in the partial page for a
buffer.  This means locking the extent in btrfs_buffer_uptodate does not
synchronize with anything on non-subpage file systems, and on subpage
file systems it only waits for a parallel read(-ahead) to finish,
which seems to be counter to what the callers actually expect.

Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/disk-io.c