Patch "xfs: lock dquot buffer before detaching dquot from b_li_list" has been added to the 6.12-stable tree

<[email protected]> Tue, 11 Feb 2025 11:32:38 +0100
Newsgroups dev.linux.lists.xfs-stable
Message-ID <2025021138-viewpoint-annex-780c@gregkh>
This is a note to let you know that I've just added the patch titled

    xfs: lock dquot buffer before detaching dquot from b_li_list

to the 6.12-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     xfs-lock-dquot-buffer-before-detaching-dquot-from-b_li_list.patch
and it can be found in the queue-6.12 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.


From [email protected] Fri Feb  7 20:28:59 2025
From: "Darrick J. Wong" <[email protected]>
Date: Fri, 07 Feb 2025 11:28:54 -0800
Subject: xfs: lock dquot buffer before detaching dquot from b_li_list
To: [email protected], [email protected]
Cc: [email protected], [email protected], [email protected]
Message-ID: <173895601566.3373740.7315790259628729484.stgit@frogsfrogsfrogs>

From: Darrick J. Wong <[email protected]>

commit 111d36d6278756128b7d7fab787fdcbf8221cd98 upstream

We have to lock the buffer before we can delete the dquot log item from
the buffer's log item list.

Cc: <[email protected]> # v6.13-rc3
Fixes: acc8f8628c3737 ("xfs: attach dquot buffer to dquot log item buffer")
Signed-off-by: "Darrick J. Wong" <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Carlos Maiolino <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
 fs/xfs/xfs_dquot.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


--- a/fs/xfs/xfs_dquot.c
+++ b/fs/xfs/xfs_dquot.c
@@ -87,8 +87,9 @@ xfs_dquot_detach_buf(
 	}
 	spin_unlock(&qlip->qli_lock);
 	if (bp) {
+		xfs_buf_lock(bp);
 		list_del_init(&qlip->qli_item.li_bio_list);
-		xfs_buf_rele(bp);
+		xfs_buf_relse(bp);
 	}
 }
 


Patches currently in stable-queue which might be from [email protected] are

queue-6.12/xfs-lock-dquot-buffer-before-detaching-dquot-from-b_li_list.patch
queue-6.12/xfs-attach-dquot-buffer-to-dquot-log-item-buffer.patch
queue-6.12/xfs-report-realtime-block-quota-limits-on-realtime-d.patch
queue-6.12/xfs-don-t-over-report-free-space-or-inodes-in-statvf.patch
queue-6.12/xfs-convert-quotacheck-to-attach-dquot-buffers.patch
queue-6.12/xfs-don-t-lose-solo-dquot-update-transactions.patch
queue-6.12/xfs-avoid-nested-calls-to-__xfs_trans_commit.patch
queue-6.12/xfs-release-the-dquot-buf-outside-of-qli_lock.patch
queue-6.12/xfs-clean-up-log-item-accesses-in-xfs_qm_dqflush-_done.patch
queue-6.12/xfs-don-t-lose-solo-superblock-counter-update-transactions.patch
queue-6.12/xfs-add-error-handling-for-xfs_reflink_cancel_cow_range.patch
queue-6.12/xfs-propagate-errors-from-xfs_reflink_cancel_cow_range-in-xfs_dax_write_iomap_end.patch
queue-6.12/xfs-fix-mount-hang-during-primary-superblock-recovery-failure.patch
queue-6.12/xfs-don-t-call-remap_verify_area-with-sb-write-protection-held.patch
queue-6.12/xfs-separate-dquot-buffer-reads-from-xfs_dqflush.patch