diff mbox series

[13/15] xfs: simplify xfsaild_resubmit_item

Message ID 20250106095613.847700-14-hch@lst.de (mailing list archive)
State New
Headers show
Series [01/15] xfs: fix a double completion for buffers on in-memory targets | expand

Commit Message

Christoph Hellwig Jan. 6, 2025, 9:54 a.m. UTC
Since commit acc8f8628c37 ("xfs: attach dquot buffer to dquot log item
buffer") all buf items that use bp->b_li_list are explicitly checked for
in the branch to just clears XFS_LI_FAILED.  Remove the dead arm that
calls xfs_clear_li_failed.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 fs/xfs/xfs_trans_ail.c | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

Comments

Darrick J. Wong Jan. 7, 2025, 6:49 a.m. UTC | #1
On Mon, Jan 06, 2025 at 10:54:50AM +0100, Christoph Hellwig wrote:
> Since commit acc8f8628c37 ("xfs: attach dquot buffer to dquot log item
> buffer") all buf items that use bp->b_li_list are explicitly checked for
> in the branch to just clears XFS_LI_FAILED.  Remove the dead arm that
> calls xfs_clear_li_failed.
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Makes sense to me
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>

--D

> ---
>  fs/xfs/xfs_trans_ail.c | 9 ++-------
>  1 file changed, 2 insertions(+), 7 deletions(-)
> 
> diff --git a/fs/xfs/xfs_trans_ail.c b/fs/xfs/xfs_trans_ail.c
> index f56d62dced97..0fcb1828e598 100644
> --- a/fs/xfs/xfs_trans_ail.c
> +++ b/fs/xfs/xfs_trans_ail.c
> @@ -359,13 +359,8 @@ xfsaild_resubmit_item(
>  	}
>  
>  	/* protected by ail_lock */
> -	list_for_each_entry(lip, &bp->b_li_list, li_bio_list) {
> -		if (bp->b_flags & (_XBF_INODES | _XBF_DQUOTS))
> -			clear_bit(XFS_LI_FAILED, &lip->li_flags);
> -		else
> -			xfs_clear_li_failed(lip);
> -	}
> -
> +	list_for_each_entry(lip, &bp->b_li_list, li_bio_list)
> +		clear_bit(XFS_LI_FAILED, &lip->li_flags);
>  	xfs_buf_unlock(bp);
>  	return XFS_ITEM_SUCCESS;
>  }
> -- 
> 2.45.2
> 
>
diff mbox series

Patch

diff --git a/fs/xfs/xfs_trans_ail.c b/fs/xfs/xfs_trans_ail.c
index f56d62dced97..0fcb1828e598 100644
--- a/fs/xfs/xfs_trans_ail.c
+++ b/fs/xfs/xfs_trans_ail.c
@@ -359,13 +359,8 @@  xfsaild_resubmit_item(
 	}
 
 	/* protected by ail_lock */
-	list_for_each_entry(lip, &bp->b_li_list, li_bio_list) {
-		if (bp->b_flags & (_XBF_INODES | _XBF_DQUOTS))
-			clear_bit(XFS_LI_FAILED, &lip->li_flags);
-		else
-			xfs_clear_li_failed(lip);
-	}
-
+	list_for_each_entry(lip, &bp->b_li_list, li_bio_list)
+		clear_bit(XFS_LI_FAILED, &lip->li_flags);
 	xfs_buf_unlock(bp);
 	return XFS_ITEM_SUCCESS;
 }