]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
xfs: lock dquot buffer before detaching dquot from b_li_list
authorDarrick J. Wong <djwong@kernel.org>
Fri, 7 Feb 2025 19:28:54 +0000 (11:28 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Feb 2025 09:05:46 +0000 (10:05 +0100)
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: <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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/xfs/xfs_dquot.c

index d64d454cbe8bcad883692349e28e4c933f81689e..0d73b59f1c9e5721e796e86b0a3bdf217a65c25c 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);
        }
 }