diff options
author | Christoph Hellwig <hch@lst.de> | 2020-09-01 10:55:44 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2020-09-15 20:52:38 -0700 |
commit | 6a7584b1d82b7b9fcce02ee7aeddc58f9cebbccc (patch) | |
tree | 4898cc96725abf2f0f29885344d3e03ce884f72c | |
parent | 664ffb8a429a800c51964b94c15c6a92c8d8334c (diff) |
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>
-rw-r--r-- | fs/xfs/xfs_buf.c | 8 | ||||
-rw-r--r-- | fs/xfs/xfs_buf.h | 7 | ||||
-rw-r--r-- | 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 16a325d6e21f..19a49969431b 100644 --- a/fs/xfs/xfs_buf.c +++ b/fs/xfs/xfs_buf.c @@ -1333,7 +1333,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 @@ -1381,9 +1380,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 bea20d43a381..9eb4044597c9 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 5b2e5067ab44..3813044c2b7f 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); } /* |