diff options
-rw-r--r-- | fs/gfs2/lops.c | 2 | ||||
-rw-r--r-- | fs/gfs2/rgrp.c | 11 |
2 files changed, 5 insertions, 8 deletions
diff --git a/fs/gfs2/lops.c b/fs/gfs2/lops.c index 82dfc96c4f59..08de8b7fb316 100644 --- a/fs/gfs2/lops.c +++ b/fs/gfs2/lops.c | |||
@@ -737,7 +737,7 @@ static void databuf_lo_after_commit(struct gfs2_sbd *sdp, struct gfs2_ail *ai) | |||
737 | 737 | ||
738 | while (!list_empty(head)) { | 738 | while (!list_empty(head)) { |
739 | bd = list_entry(head->next, struct gfs2_bufdata, bd_le.le_list); | 739 | bd = list_entry(head->next, struct gfs2_bufdata, bd_le.le_list); |
740 | list_del(&bd->bd_le.le_list); | 740 | list_del_init(&bd->bd_le.le_list); |
741 | sdp->sd_log_num_databuf--; | 741 | sdp->sd_log_num_databuf--; |
742 | sdp->sd_log_num_jdata--; | 742 | sdp->sd_log_num_jdata--; |
743 | gfs2_unpin(sdp, bd->bd_bh, ai); | 743 | gfs2_unpin(sdp, bd->bd_bh, ai); |
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 4e0357dc838b..84fcc1bfaf1b 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c | |||
@@ -857,8 +857,7 @@ static struct gfs2_rgrpd *forward_rgrp_get(struct gfs2_sbd *sdp) | |||
857 | if (sdp->sd_rgrps >= journals) | 857 | if (sdp->sd_rgrps >= journals) |
858 | rg = sdp->sd_rgrps * sdp->sd_jdesc->jd_jid / journals; | 858 | rg = sdp->sd_rgrps * sdp->sd_jdesc->jd_jid / journals; |
859 | 859 | ||
860 | for (x = 0, rgd = gfs2_rgrpd_get_first(sdp); | 860 | for (x = 0, rgd = gfs2_rgrpd_get_first(sdp); x < rg; |
861 | x < rg; | ||
862 | x++, rgd = gfs2_rgrpd_get_next(rgd)) | 861 | x++, rgd = gfs2_rgrpd_get_next(rgd)) |
863 | /* Do Nothing */; | 862 | /* Do Nothing */; |
864 | 863 | ||
@@ -909,9 +908,8 @@ static int get_local_rgrp(struct gfs2_inode *ip) | |||
909 | rgd = recent_rgrp_first(sdp, ip->i_last_rg_alloc); | 908 | rgd = recent_rgrp_first(sdp, ip->i_last_rg_alloc); |
910 | 909 | ||
911 | while (rgd) { | 910 | while (rgd) { |
912 | error = gfs2_glock_nq_init(rgd->rd_gl, | 911 | error = gfs2_glock_nq_init(rgd->rd_gl, LM_ST_EXCLUSIVE, |
913 | LM_ST_EXCLUSIVE, LM_FLAG_TRY, | 912 | LM_FLAG_TRY, &al->al_rgd_gh); |
914 | &al->al_rgd_gh); | ||
915 | switch (error) { | 913 | switch (error) { |
916 | case 0: | 914 | case 0: |
917 | if (try_rgrp_fit(rgd, al)) | 915 | if (try_rgrp_fit(rgd, al)) |
@@ -934,8 +932,7 @@ static int get_local_rgrp(struct gfs2_inode *ip) | |||
934 | begin = rgd = forward_rgrp_get(sdp); | 932 | begin = rgd = forward_rgrp_get(sdp); |
935 | 933 | ||
936 | for (;;) { | 934 | for (;;) { |
937 | error = gfs2_glock_nq_init(rgd->rd_gl, | 935 | error = gfs2_glock_nq_init(rgd->rd_gl, LM_ST_EXCLUSIVE, flags, |
938 | LM_ST_EXCLUSIVE, flags, | ||
939 | &al->al_rgd_gh); | 936 | &al->al_rgd_gh); |
940 | switch (error) { | 937 | switch (error) { |
941 | case 0: | 938 | case 0: |