aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/recovery.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/recovery.c')
-rw-r--r--fs/gfs2/recovery.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/fs/gfs2/recovery.c b/fs/gfs2/recovery.c
index a27569c5d85e..130e9fbf9692 100644
--- a/fs/gfs2/recovery.c
+++ b/fs/gfs2/recovery.c
@@ -369,25 +369,23 @@ static int clean_journal(struct gfs2_jdesc *jd, struct gfs2_log_header *head)
369 struct gfs2_inode *ip = GFS2_I(jd->jd_inode); 369 struct gfs2_inode *ip = GFS2_I(jd->jd_inode);
370 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); 370 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
371 unsigned int lblock; 371 unsigned int lblock;
372 int new = 0;
373 u64 dblock;
374 struct gfs2_log_header *lh; 372 struct gfs2_log_header *lh;
375 u32 hash; 373 u32 hash;
376 struct buffer_head *bh; 374 struct buffer_head *bh;
377 int error; 375 int error;
378 int boundary; 376 struct buffer_head bh_map;
379 377
380 lblock = head->lh_blkno; 378 lblock = head->lh_blkno;
381 gfs2_replay_incr_blk(sdp, &lblock); 379 gfs2_replay_incr_blk(sdp, &lblock);
382 error = gfs2_block_map(&ip->i_inode, lblock, &new, &dblock, &boundary); 380 error = gfs2_block_map(&ip->i_inode, lblock, 0, &bh_map, 1);
383 if (error) 381 if (error)
384 return error; 382 return error;
385 if (!dblock) { 383 if (!bh_map.b_blocknr) {
386 gfs2_consist_inode(ip); 384 gfs2_consist_inode(ip);
387 return -EIO; 385 return -EIO;
388 } 386 }
389 387
390 bh = sb_getblk(sdp->sd_vfs, dblock); 388 bh = sb_getblk(sdp->sd_vfs, bh_map.b_blocknr);
391 lock_buffer(bh); 389 lock_buffer(bh);
392 memset(bh->b_data, 0, bh->b_size); 390 memset(bh->b_data, 0, bh->b_size);
393 set_buffer_uptodate(bh); 391 set_buffer_uptodate(bh);