]> www.infradead.org Git - users/hch/xfs.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 04:49:02 +0000 (05:49 +0100)
commitb66b79b78bc719e6c83a176c80b9424f5b6c7c2f
treea00775637abd4805adb793ae9f7ffa9673ae8760
parent4af32f9f363c7d67587ae12d33e8afe9cd839d09
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