summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2026-06-25 15:58:34 +0200
committerCarlos Maiolino <cem@kernel.org>2026-07-01 12:29:50 +0200
commitb53177d418225b15d23b1817fac1b5c668e56c2f (patch)
tree6e591f1a8f3fd9c367730808dcd03e82e6c857b6 /fs
parent4c8b46d832bd98eab914e2bbcd32447b584b03a7 (diff)
downloadlinux-next-b53177d418225b15d23b1817fac1b5c668e56c2f.tar.gz
linux-next-b53177d418225b15d23b1817fac1b5c668e56c2f.zip
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/xfs/xfs_buf.c22
1 files changed, 8 insertions, 14 deletions
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index aa4317793c57..f5e23c8b07b6 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@ -1147,18 +1147,6 @@ __xfs_buf_ioend(
}
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 @@ ioerror:
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);
}
/*