]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xfs: remove xfs_buf_cache.bc_lock
authorChristoph Hellwig <hch@lst.de>
Tue, 28 Jan 2025 05:22:58 +0000 (06:22 +0100)
committerCarlos Maiolino <cem@kernel.org>
Tue, 28 Jan 2025 10:18:22 +0000 (11:18 +0100)
commita9ab28b3d21aec6d0f56fe722953e20ce470237b
treecce12a6c8eba15387c1ec6fea0573621b3570196
parent26b63bee2f6e711c5a169997fd126fddcfb90848
xfs: remove xfs_buf_cache.bc_lock

xfs_buf_cache.bc_lock serializes adding buffers to and removing them from
the hashtable.  But as the rhashtable code already uses fine grained
internal locking for inserts and removals the extra protection isn't
actually required.

It also happens to fix a lock order inversion vs b_lock added by the
recent lookup race fix.

Fixes: ee10f6fcdb96 ("xfs: fix buffer lookup vs release race")
Reported-by: Lai, Yi <yi1.lai@linux.intel.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/xfs_buf.c
fs/xfs/xfs_buf.h