Re: [PATCH 07/12] xfs: use WRITE_ONCE to update b_flags
Christoph Hellwig <[email protected]> Tue, 28 Jul 2026 06:40:50 +0200
| Newsgroups | org.kernel.vger.linux-xfs |
|---|---|
| Message-ID | <[email protected]> |
On Fri, Jul 24, 2026 at 09:53:35AM -0700, Darrick J. Wong wrote: > > @@ -436,7 +451,7 @@ xfs_buf_find_lock( > > return -ENOENT; > > } > > ASSERT((bp->b_flags & _XBF_DELWRI_Q) == 0); > > - bp->b_flags &= _XBF_KMEM; > > + xfs_buf_clear_flags(bp, ~_XBF_KMEM); > > Looks ok to me, though it took me a while to figure out that this line > correctly preserves clearing every bit *except* _XBF_KMEM. Yeah. And I'm still struggling why we even clear all the state here in the lookup path and not when marking the buffer stale. I've given up for now, but eventually I'd love to understand it.