]> www.infradead.org Git - users/hch/misc.git/commit
xfs: remove xfs_buf_cache.bc_lock
authorChristoph Hellwig <hch@lst.de>
Sun, 12 Jan 2025 06:00:04 +0000 (07:00 +0100)
committerChristoph Hellwig <hch@lst.de>
Mon, 3 Feb 2025 09:18:36 +0000 (10:18 +0100)
commit648efbeab2023af6f0a82e497b5cf20e3bbbb442
treea00775637abd4805adb793ae9f7ffa9673ae8760
parent99ac624d9c3db214536c658098c37ef463e79027
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>
fs/xfs/xfs_buf.c
fs/xfs/xfs_buf.h