]> www.infradead.org Git - users/hch/xfs.git/commit
xfs: use a lockref for the buffer reference count
authorChristoph Hellwig <hch@lst.de>
Sun, 12 Jan 2025 15:43:10 +0000 (16:43 +0100)
committerChristoph Hellwig <hch@lst.de>
Mon, 13 Jan 2025 04:17:39 +0000 (05:17 +0100)
commitdf63968f7fc709474f988bfedc0b686d4580b357
treeca0a7714db43e89f421225f7d1a361d879abebe5
parent8b46634dd6199f332f09e6f730a7a8801547c8b5
xfs: use a lockref for the buffer reference count

The lockref structure allows incrementing/decrementing counters like
an atomic_t for the fast path, while still allowing complex slow path
operations as if the counter was protected by a lock.  The only slow
path operations that actually need to take the lock are the final
put, LRU evictions and marking a buffer stale.

Signed-off-by: Christoph Hellwig <hch@lst.de>
fs/xfs/xfs_buf.c
fs/xfs/xfs_buf.h
fs/xfs/xfs_trace.h