aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_log_recover.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2012-04-23 01:58:55 -0400
committerBen Myers <bpm@sgi.com>2012-05-14 17:20:51 -0400
commit7ca790a507a9288ebedab90a8e40b9afa8e4e949 (patch)
tree70ad7655655e3f5e021b3c80f5c102f4399bbd68 /fs/xfs/xfs_log_recover.c
parenta8acad70731e7d0585f25f33f8a009176f001f70 (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_log_recover.c')
-rw-r--r--fs/xfs/xfs_log_recover.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/fs/xfs/xfs_log_recover.c b/fs/xfs/xfs_log_recover.c
index 0d9bdb6bace4..c8ee0fc49042 100644
--- a/fs/xfs/xfs_log_recover.c
+++ b/fs/xfs/xfs_log_recover.c
@@ -2539,14 +2539,11 @@ xlog_recover_dquot_pass2(
2539 return XFS_ERROR(EIO); 2539 return XFS_ERROR(EIO);
2540 ASSERT(dq_f->qlf_len == 1); 2540 ASSERT(dq_f->qlf_len == 1);
2541 2541
2542 error = xfs_read_buf(mp, mp->m_ddev_targp, 2542 error = xfs_trans_read_buf(mp, NULL, mp->m_ddev_targp, dq_f->qlf_blkno,
2543 dq_f->qlf_blkno, 2543 XFS_FSB_TO_BB(mp, dq_f->qlf_len), 0, &bp);
2544 XFS_FSB_TO_BB(mp, dq_f->qlf_len), 2544 if (error)
2545 0, &bp);
2546 if (error) {
2547 xfs_buf_ioerror_alert(bp, "xlog_recover_do..(read#3)");
2548 return error; 2545 return error;
2549 } 2546
2550 ASSERT(bp); 2547 ASSERT(bp);
2551 ddq = (xfs_disk_dquot_t *)xfs_buf_offset(bp, dq_f->qlf_boffset); 2548 ddq = (xfs_disk_dquot_t *)xfs_buf_offset(bp, dq_f->qlf_boffset);
2552 2549