]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
xfs: lock dquot buffer before detaching dquot from b_li_list
authorDarrick J. Wong <djwong@kernel.org>
Thu, 9 Jan 2025 00:54:02 +0000 (16:54 -0800)
committerCarlos Maiolino <cem@kernel.org>
Fri, 10 Jan 2025 09:12:48 +0000 (10:12 +0100)
We have to lock the buffer before we can delete the dquot log item from
the buffer's log item list.

Cc: stable@vger.kernel.org # v6.13-rc3
Fixes: acc8f8628c3737 ("xfs: attach dquot buffer to dquot log item buffer")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/xfs_dquot.c

index f11d475898f280e41a5187c715881266ee516de9..201c26322edea4bec9e35d60b8b26559cb490404 100644 (file)
@@ -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);
        }
 }