diff options
Diffstat (limited to 'fs/gfs2/rgrp.c')
-rw-r--r-- | fs/gfs2/rgrp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 48a6461d601c..a62c0f2d26d3 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c | |||
@@ -527,10 +527,10 @@ static int gfs2_ri_update(struct gfs2_inode *ip) | |||
527 | struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); | 527 | struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); |
528 | struct inode *inode = &ip->i_inode; | 528 | struct inode *inode = &ip->i_inode; |
529 | struct file_ra_state ra_state; | 529 | struct file_ra_state ra_state; |
530 | u64 junk = ip->i_di.di_size; | 530 | u64 rgrp_count = ip->i_di.di_size; |
531 | int error; | 531 | int error; |
532 | 532 | ||
533 | if (do_div(junk, sizeof(struct gfs2_rindex))) { | 533 | if (do_div(rgrp_count, sizeof(struct gfs2_rindex))) { |
534 | gfs2_consist_inode(ip); | 534 | gfs2_consist_inode(ip); |
535 | return -EIO; | 535 | return -EIO; |
536 | } | 536 | } |
@@ -538,7 +538,7 @@ static int gfs2_ri_update(struct gfs2_inode *ip) | |||
538 | clear_rgrpdi(sdp); | 538 | clear_rgrpdi(sdp); |
539 | 539 | ||
540 | file_ra_state_init(&ra_state, inode->i_mapping); | 540 | file_ra_state_init(&ra_state, inode->i_mapping); |
541 | for (sdp->sd_rgrps = 0;; sdp->sd_rgrps++) { | 541 | for (sdp->sd_rgrps = 0; sdp->sd_rgrps < rgrp_count; sdp->sd_rgrps++) { |
542 | error = read_rindex_entry(ip, &ra_state); | 542 | error = read_rindex_entry(ip, &ra_state); |
543 | if (error) { | 543 | if (error) { |
544 | clear_rgrpdi(sdp); | 544 | clear_rgrpdi(sdp); |