On Mon, Nov 25, 2024 at 05:29:55PM -0800, Darrick J. Wong wrote: > + spin_lock(&qlip->qli_lock); > + if (qlip->qli_item.li_buf) { > + bp = qlip->qli_item.li_buf; > + qlip->qli_item.li_buf = NULL; > + } > + spin_unlock(&qlip->qli_lock); > + if (bp) > + xfs_buf_rele(bp); > + spin_lock(&qlip->qli_lock); > + if (!qlip->qli_dirty) { > + bp = lip->li_buf; > + lip->li_buf = NULL; > + } > + spin_unlock(&qlip->qli_lock); > + if (bp) > + xfs_buf_rele(bp); Should this move into a common helper and always use either the buf or dirty check instead of mixing them? Otherwise looks good: Reviewed-by: Christoph Hellwig <hch@xxxxxx>