From: Darrick J. Wong Date: Fri, 7 Feb 2025 19:28:54 +0000 (-0800) Subject: xfs: lock dquot buffer before detaching dquot from b_li_list X-Git-Tag: v6.12.14~18 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=84307caff2f427b4c0026a5287e235e7a75fb478;p=thirdparty%2Fkernel%2Fstable.git xfs: lock dquot buffer before detaching dquot from b_li_list 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: # v6.13-rc3 Fixes: acc8f8628c3737 ("xfs: attach dquot buffer to dquot log item buffer") Signed-off-by: "Darrick J. Wong" Reviewed-by: Christoph Hellwig Signed-off-by: Carlos Maiolino Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/xfs/xfs_dquot.c b/fs/xfs/xfs_dquot.c index d64d454cbe8bc..0d73b59f1c9e5 100644 --- 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); } }