diff options
Diffstat (limited to 'fs/gfs2/rgrp.c')
-rw-r--r-- | fs/gfs2/rgrp.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 5fd87104e595..3f10b1fafd66 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c | |||
@@ -540,7 +540,7 @@ static int read_rindex_entry(struct gfs2_inode *ip, | |||
540 | return error; | 540 | return error; |
541 | 541 | ||
542 | rgd->rd_gl->gl_object = rgd; | 542 | rgd->rd_gl->gl_object = rgd; |
543 | rgd->rd_rg_vn = rgd->rd_gl->gl_vn - 1; | 543 | rgd->rd_flags &= ~GFS2_RDF_UPTODATE; |
544 | rgd->rd_flags |= GFS2_RDF_CHECK; | 544 | rgd->rd_flags |= GFS2_RDF_CHECK; |
545 | return error; | 545 | return error; |
546 | } | 546 | } |
@@ -576,7 +576,7 @@ static int gfs2_ri_update(struct gfs2_inode *ip) | |||
576 | } | 576 | } |
577 | } | 577 | } |
578 | 578 | ||
579 | sdp->sd_rindex_vn = ip->i_gl->gl_vn; | 579 | sdp->sd_rindex_uptodate = 1; |
580 | return 0; | 580 | return 0; |
581 | } | 581 | } |
582 | 582 | ||
@@ -610,7 +610,7 @@ static int gfs2_ri_update_special(struct gfs2_inode *ip) | |||
610 | } | 610 | } |
611 | } | 611 | } |
612 | 612 | ||
613 | sdp->sd_rindex_vn = ip->i_gl->gl_vn; | 613 | sdp->sd_rindex_uptodate = 1; |
614 | return 0; | 614 | return 0; |
615 | } | 615 | } |
616 | 616 | ||
@@ -643,9 +643,9 @@ int gfs2_rindex_hold(struct gfs2_sbd *sdp, struct gfs2_holder *ri_gh) | |||
643 | return error; | 643 | return error; |
644 | 644 | ||
645 | /* Read new copy from disk if we don't have the latest */ | 645 | /* Read new copy from disk if we don't have the latest */ |
646 | if (sdp->sd_rindex_vn != gl->gl_vn) { | 646 | if (!sdp->sd_rindex_uptodate) { |
647 | mutex_lock(&sdp->sd_rindex_mutex); | 647 | mutex_lock(&sdp->sd_rindex_mutex); |
648 | if (sdp->sd_rindex_vn != gl->gl_vn) { | 648 | if (!sdp->sd_rindex_uptodate) { |
649 | error = gfs2_ri_update(ip); | 649 | error = gfs2_ri_update(ip); |
650 | if (error) | 650 | if (error) |
651 | gfs2_glock_dq_uninit(ri_gh); | 651 | gfs2_glock_dq_uninit(ri_gh); |
@@ -737,9 +737,9 @@ int gfs2_rgrp_bh_get(struct gfs2_rgrpd *rgd) | |||
737 | } | 737 | } |
738 | } | 738 | } |
739 | 739 | ||
740 | if (rgd->rd_rg_vn != gl->gl_vn) { | 740 | if (!(rgd->rd_flags & GFS2_RDF_UPTODATE)) { |
741 | gfs2_rgrp_in(rgd, (rgd->rd_bits[0].bi_bh)->b_data); | 741 | gfs2_rgrp_in(rgd, (rgd->rd_bits[0].bi_bh)->b_data); |
742 | rgd->rd_rg_vn = gl->gl_vn; | 742 | rgd->rd_flags |= GFS2_RDF_UPTODATE; |
743 | } | 743 | } |
744 | 744 | ||
745 | spin_lock(&sdp->sd_rindex_spin); | 745 | spin_lock(&sdp->sd_rindex_spin); |