diff options
author | Dave Chinner <dchinner@redhat.com> | 2012-04-23 01:58:55 -0400 |
---|---|---|
committer | Ben Myers <bpm@sgi.com> | 2012-05-14 17:20:51 -0400 |
commit | 7ca790a507a9288ebedab90a8e40b9afa8e4e949 (patch) | |
tree | 70ad7655655e3f5e021b3c80f5c102f4399bbd68 /fs/xfs/xfs_trans_buf.c | |
parent | a8acad70731e7d0585f25f33f8a009176f001f70 (diff) |
xfs: kill xfs_read_buf()
xfs_read_buf() is effectively the same as xfs_trans_read_buf() when called
outside a transaction context. The error handling is slightly different in that
xfs_read_buf stales the errored buffer it gets back, but there is probably good
reason for xfs_trans_read_buf() for doing this.
Hence update xfs_trans_read_buf() to the same error handling as xfs_read_buf(),
and convert all the callers of xfs_read_buf() to use the former function. We can
then remove xfs_read_buf().
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_trans_buf.c')
-rw-r--r-- | fs/xfs/xfs_trans_buf.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/xfs/xfs_trans_buf.c b/fs/xfs/xfs_trans_buf.c index f9cb7ee04dae..5e4cf617e56c 100644 --- a/fs/xfs/xfs_trans_buf.c +++ b/fs/xfs/xfs_trans_buf.c | |||
@@ -274,6 +274,8 @@ xfs_trans_read_buf( | |||
274 | xfs_buf_log_item_t *bip; | 274 | xfs_buf_log_item_t *bip; |
275 | int error; | 275 | int error; |
276 | 276 | ||
277 | *bpp = NULL; | ||
278 | |||
277 | if (flags == 0) | 279 | if (flags == 0) |
278 | flags = XBF_MAPPED; | 280 | flags = XBF_MAPPED; |
279 | 281 | ||
@@ -289,6 +291,8 @@ xfs_trans_read_buf( | |||
289 | if (bp->b_error) { | 291 | if (bp->b_error) { |
290 | error = bp->b_error; | 292 | error = bp->b_error; |
291 | xfs_buf_ioerror_alert(bp, __func__); | 293 | xfs_buf_ioerror_alert(bp, __func__); |
294 | XFS_BUF_UNDONE(bp); | ||
295 | xfs_buf_stale(bp); | ||
292 | xfs_buf_relse(bp); | 296 | xfs_buf_relse(bp); |
293 | return error; | 297 | return error; |
294 | } | 298 | } |