mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 17:47:41 +02:00
xfs: remove xfs_buf_ioend
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>
This commit is contained in:
parent
4c8b46d832
commit
b53177d418
|
|
@ -1146,18 +1146,6 @@ __xfs_buf_ioend(
|
|||
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)
|
||||
|
|
@ -1207,7 +1195,8 @@ xfs_buf_fail(
|
|||
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
|
||||
|
|
@ -1415,7 +1404,12 @@ xfs_buf_submit(
|
|||
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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user