There are two callers of xfs_buf_ioend, one of which always has the
XBF_ASYNC flag set. Open code the logic in both callers to prepare for a
bug fix.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
return true;
}
-static void
-xfs_buf_ioend(
- struct xfs_buf *bp)
-{
- if (!__xfs_buf_ioend(bp))
- return;
- if (bp->b_flags & XBF_ASYNC)
- xfs_buf_relse(bp);
- else
- complete(&bp->b_iowait);
-}
-
static void
xfs_buf_ioend_work(
struct work_struct *work)
bp->b_flags &= ~XBF_DONE;
xfs_buf_stale(bp);
xfs_buf_ioerror(bp, -EIO);
- xfs_buf_ioend(bp);
+ if (__xfs_buf_ioend(bp))
+ xfs_buf_relse(bp);
}
int
bp->b_flags &= ~XBF_DONE;
xfs_buf_stale(bp);
end_io:
- xfs_buf_ioend(bp);
+ if (!__xfs_buf_ioend(bp))
+ return;
+ if (bp->b_flags & XBF_ASYNC)
+ xfs_buf_relse(bp);
+ else
+ complete(&bp->b_iowait);
}
/*