Re: [PATCH 05/13] xfs: fold xfs_buf_ioend_finish into xfs_ioend

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Jul 09, 2020 at 05:04:45PM +0200, Christoph Hellwig wrote:
> No need to keep a separate helper for this logic.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>

Looks ok to me,
Reviewed-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx>

--D

> ---
>  fs/xfs/xfs_buf.c         | 8 +++++---
>  fs/xfs/xfs_buf.h         | 7 -------
>  fs/xfs/xfs_log_recover.c | 1 -
>  3 files changed, 5 insertions(+), 11 deletions(-)
> 
> diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
> index 443d11bdfcf502..e6a73e455caa1a 100644
> --- a/fs/xfs/xfs_buf.c
> +++ b/fs/xfs/xfs_buf.c
> @@ -1335,7 +1335,6 @@ xfs_buf_ioend(
>  			bp->b_ops->verify_read(bp);
>  		if (!bp->b_error)
>  			bp->b_flags |= XBF_DONE;
> -		xfs_buf_ioend_finish(bp);
>  	} else if (bp->b_flags & _XBF_LOGRECOVERY) {
>  		/*
>  		 * If this is a log recovery buffer, we aren't doing
> @@ -1383,9 +1382,12 @@ xfs_buf_ioend(
>  			xfs_buf_inode_iodone(bp);
>  		else if (bp->b_flags & _XBF_DQUOTS)
>  			xfs_buf_dquot_iodone(bp);
> -
> -		xfs_buf_ioend_finish(bp);
>  	}
> +
> +	if (bp->b_flags & XBF_ASYNC)
> +		xfs_buf_relse(bp);
> +	else
> +		complete(&bp->b_iowait);
>  }
>  
>  static void
> diff --git a/fs/xfs/xfs_buf.h b/fs/xfs/xfs_buf.h
> index bea20d43a38191..9eb4044597c985 100644
> --- a/fs/xfs/xfs_buf.h
> +++ b/fs/xfs/xfs_buf.h
> @@ -269,13 +269,6 @@ static inline void xfs_buf_relse(xfs_buf_t *bp)
>  
>  /* Buffer Read and Write Routines */
>  extern int xfs_bwrite(struct xfs_buf *bp);
> -static inline void xfs_buf_ioend_finish(struct xfs_buf *bp)
> -{
> -	if (bp->b_flags & XBF_ASYNC)
> -		xfs_buf_relse(bp);
> -	else
> -		complete(&bp->b_iowait);
> -}
>  
>  extern void __xfs_buf_ioerror(struct xfs_buf *bp, int error,
>  		xfs_failaddr_t failaddr);
> diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
> index cf6dabb98f2327..741a2c247bc585 100644
> --- a/fs/xfs/xfs_log_recover.c
> +++ b/fs/xfs/xfs_log_recover.c
> @@ -288,7 +288,6 @@ xlog_recover_iodone(
>  		xfs_buf_item_relse(bp);
>  	ASSERT(bp->b_log_item == NULL);
>  	bp->b_flags &= ~_XBF_LOGRECOVERY;
> -	xfs_buf_ioend_finish(bp);
>  }
>  
>  /*
> -- 
> 2.26.2
> 



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux