]> www.infradead.org Git - users/jedix/linux-maple.git/commit
xfs: remove the leftover xfs_{set,clear}_li_failed infrastructure
authorChristoph Hellwig <hch@lst.de>
Thu, 20 Mar 2025 07:52:13 +0000 (08:52 +0100)
committerCarlos Maiolino <cem@kernel.org>
Mon, 14 Apr 2025 08:24:30 +0000 (10:24 +0200)
commitb73e05281cd9e37b5525641ca6f4544867372533
tree975200d666dff92fe453e3b389eb2b4d6204065b
parent8ffd015db85fea3e15a77027fda6c02ced4d2444
xfs: remove the leftover xfs_{set,clear}_li_failed infrastructure

Marking a log item as failed kept a buffer reference around for
resubmission of inode and dquote items.

For inode items commit 298f7bec503f3 ("xfs: pin inode backing buffer to
the inode log item") started pinning the inode item buffers
unconditionally and removed the need for this.  Later commit acc8f8628c37
("xfs: attach dquot buffer to dquot log item buffer") did the same for
dquot items but didn't fully clean up the xfs_clear_li_failed side
for them.  Stop adding the extra pin for dquot items and remove the
helpers.

This happens to fix a call to xfs_buf_free with the AIL lock held,
which would be incorrect for the unlikely case freeing the buffer
ends up calling vfree.

Reported-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
fs/xfs/xfs_dquot.c
fs/xfs/xfs_inode_item.c
fs/xfs/xfs_trans_ail.c
fs/xfs/xfs_trans_priv.h