aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/rgrp.c
diff options
context:
space:
mode:
authorRobert Peterson <rpeterso@redhat.com>2007-05-14 13:42:18 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2007-07-09 03:22:19 -0400
commitcd81a4bac67d44742ab0aa1848f4a78e9d7e1093 (patch)
tree0cc323d20ff2cc8faffc99ee5a998409cb4f165d /fs/gfs2/rgrp.c
parent0507ecf50f22e433592f5ec3a36dc831aaec2e02 (diff)
[GFS2] Addendum patch 2 for gfs2_grow
This addendum patch 2 corrects three things: 1. It fixes a stupid mistake in the previous addendum that broke gfs2. Ref: https://www.redhat.com/archives/cluster-devel/2007-May/msg00162.html 2. It fixes a problem that Dave Teigland pointed out regarding the external declarations in ops_address.h being in the wrong place. 3. It recasts a couple more %llu printks to (unsigned long long) as requested by Steve Whitehouse. I would have loved to put this all in one revised patch, but there was a rush to get some patches for RHEL5. Therefore, the previous patches were applied to the git tree "as is" and therefore, I'm posting another addendum. Sorry. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/rgrp.c')
-rw-r--r--fs/gfs2/rgrp.c6
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);