summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_buf.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2022-07-07 22:05:18 +1000
committerDave Chinner <david@fromorbit.com>2022-07-07 22:05:18 +1000
commit85c73bf726e41be276bcad3325d9a8aef10be289 (patch)
tree1cd74ee0a59eeb2fb856fd40387bec20ef553adf /fs/xfs/xfs_buf.c
parent7561cea5dbb97fecb952548a0fb74fb105bf4664 (diff)
downloadlinux-85c73bf726e41be276bcad3325d9a8aef10be289.tar.bz2
xfs: rework xfs_buf_incore() API
Make it consistent with the other buffer APIs to return a error and the buffer is placed in a parameter. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/xfs_buf.c')
-rw-r--r--fs/xfs/xfs_buf.c19
1 files changed, 2 insertions, 17 deletions
diff --git a/fs/xfs/xfs_buf.c b/fs/xfs/xfs_buf.c
index bf4e60871068..143e1c70df5d 100644
--- a/fs/xfs/xfs_buf.c
+++ b/fs/xfs/xfs_buf.c
@@ -616,23 +616,6 @@ found:
return 0;
}
-struct xfs_buf *
-xfs_buf_incore(
- struct xfs_buftarg *target,
- xfs_daddr_t blkno,
- size_t numblks,
- xfs_buf_flags_t flags)
-{
- struct xfs_buf *bp;
- int error;
- DEFINE_SINGLE_BUF_MAP(map, blkno, numblks);
-
- error = xfs_buf_find(target, &map, 1, flags, NULL, &bp);
- if (error)
- return NULL;
- return bp;
-}
-
/*
* Assembles a buffer covering the specified range. The code is optimised for
* cache hits, as metadata intensive workloads will see 3 orders of magnitude
@@ -656,6 +639,8 @@ xfs_buf_get_map(
goto found;
if (error != -ENOENT)
return error;
+ if (flags & XBF_INCORE)
+ return -ENOENT;
error = _xfs_buf_alloc(target, map, nmaps, flags, &new_bp);
if (error)