2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-29 23:53:55 +08:00

xfs: fold xfs_buf_ioend_finish into xfs_ioend

No need to keep a separate helper for this logic.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
This commit is contained in:
Christoph Hellwig 2020-09-01 10:55:44 -07:00 committed by Darrick J. Wong
parent 664ffb8a42
commit 6a7584b1d8
3 changed files with 5 additions and 11 deletions

View File

@ -1333,7 +1333,6 @@ xfs_buf_ioend(
bp->b_ops->verify_read(bp); bp->b_ops->verify_read(bp);
if (!bp->b_error) if (!bp->b_error)
bp->b_flags |= XBF_DONE; bp->b_flags |= XBF_DONE;
xfs_buf_ioend_finish(bp);
} else if (bp->b_flags & _XBF_LOGRECOVERY) { } else if (bp->b_flags & _XBF_LOGRECOVERY) {
/* /*
* If this is a log recovery buffer, we aren't doing * If this is a log recovery buffer, we aren't doing
@ -1381,9 +1380,12 @@ xfs_buf_ioend(
xfs_buf_inode_iodone(bp); xfs_buf_inode_iodone(bp);
else if (bp->b_flags & _XBF_DQUOTS) else if (bp->b_flags & _XBF_DQUOTS)
xfs_buf_dquot_iodone(bp); 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 static void

View File

@ -269,13 +269,6 @@ static inline void xfs_buf_relse(xfs_buf_t *bp)
/* Buffer Read and Write Routines */ /* Buffer Read and Write Routines */
extern int xfs_bwrite(struct xfs_buf *bp); 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, extern void __xfs_buf_ioerror(struct xfs_buf *bp, int error,
xfs_failaddr_t failaddr); xfs_failaddr_t failaddr);

View File

@ -288,7 +288,6 @@ xlog_recover_iodone(
xfs_buf_item_relse(bp); xfs_buf_item_relse(bp);
ASSERT(bp->b_log_item == NULL); ASSERT(bp->b_log_item == NULL);
bp->b_flags &= ~_XBF_LOGRECOVERY; bp->b_flags &= ~_XBF_LOGRECOVERY;
xfs_buf_ioend_finish(bp);
} }
/* /*