diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2020-01-23 17:01:15 -0800 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2020-01-26 14:32:25 -0800 |
commit | 3848b5f6709221b7ab52c9639baee50dc4b006bb (patch) | |
tree | 48c1fecf9dee9aa436060c9240ce9e6bfcfa6f71 /fs/xfs/xfs_trans_buf.c | |
parent | 32dff5e5d1b5889b068e411d490453834c639701 (diff) | |
download | linux-3848b5f6709221b7ab52c9639baee50dc4b006bb.tar.bz2 |
xfs: make xfs_buf_get_map return an error code
Convert xfs_buf_get_map() to return numeric error codes like most
everywhere else in xfs.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/xfs_trans_buf.c')
-rw-r--r-- | fs/xfs/xfs_trans_buf.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/fs/xfs/xfs_trans_buf.c b/fs/xfs/xfs_trans_buf.c index b5b3a78ef31c..288333fef13a 100644 --- a/fs/xfs/xfs_trans_buf.c +++ b/fs/xfs/xfs_trans_buf.c @@ -122,9 +122,14 @@ xfs_trans_get_buf_map( { xfs_buf_t *bp; struct xfs_buf_log_item *bip; + int error; - if (!tp) - return xfs_buf_get_map(target, map, nmaps, flags); + if (!tp) { + error = xfs_buf_get_map(target, map, nmaps, flags, &bp); + if (error) + return NULL; + return bp; + } /* * If we find the buffer in the cache with this transaction @@ -149,10 +154,9 @@ xfs_trans_get_buf_map( return bp; } - bp = xfs_buf_get_map(target, map, nmaps, flags); - if (bp == NULL) { + error = xfs_buf_get_map(target, map, nmaps, flags, &bp); + if (error) return NULL; - } ASSERT(!bp->b_error); |