Commit b8e1aabf authored by Steven Whitehouse's avatar Steven Whitehouse

[GFS2] Another list_del bug

Another case where list_del should be list_del_init.
Signed-off-by: default avatarSteven Whitehouse <swhiteho@redhat.com>
parent 08867605
...@@ -737,7 +737,7 @@ static void databuf_lo_after_commit(struct gfs2_sbd *sdp, struct gfs2_ail *ai) ...@@ -737,7 +737,7 @@ static void databuf_lo_after_commit(struct gfs2_sbd *sdp, struct gfs2_ail *ai)
while (!list_empty(head)) { while (!list_empty(head)) {
bd = list_entry(head->next, struct gfs2_bufdata, bd_le.le_list); bd = list_entry(head->next, struct gfs2_bufdata, bd_le.le_list);
list_del(&bd->bd_le.le_list); list_del_init(&bd->bd_le.le_list);
sdp->sd_log_num_databuf--; sdp->sd_log_num_databuf--;
sdp->sd_log_num_jdata--; sdp->sd_log_num_jdata--;
gfs2_unpin(sdp, bd->bd_bh, ai); gfs2_unpin(sdp, bd->bd_bh, ai);
......
...@@ -857,8 +857,7 @@ static struct gfs2_rgrpd *forward_rgrp_get(struct gfs2_sbd *sdp) ...@@ -857,8 +857,7 @@ static struct gfs2_rgrpd *forward_rgrp_get(struct gfs2_sbd *sdp)
if (sdp->sd_rgrps >= journals) if (sdp->sd_rgrps >= journals)
rg = sdp->sd_rgrps * sdp->sd_jdesc->jd_jid / journals; rg = sdp->sd_rgrps * sdp->sd_jdesc->jd_jid / journals;
for (x = 0, rgd = gfs2_rgrpd_get_first(sdp); for (x = 0, rgd = gfs2_rgrpd_get_first(sdp); x < rg;
x < rg;
x++, rgd = gfs2_rgrpd_get_next(rgd)) x++, rgd = gfs2_rgrpd_get_next(rgd))
/* Do Nothing */; /* Do Nothing */;
...@@ -909,9 +908,8 @@ static int get_local_rgrp(struct gfs2_inode *ip) ...@@ -909,9 +908,8 @@ static int get_local_rgrp(struct gfs2_inode *ip)
rgd = recent_rgrp_first(sdp, ip->i_last_rg_alloc); rgd = recent_rgrp_first(sdp, ip->i_last_rg_alloc);
while (rgd) { while (rgd) {
error = gfs2_glock_nq_init(rgd->rd_gl, error = gfs2_glock_nq_init(rgd->rd_gl, LM_ST_EXCLUSIVE,
LM_ST_EXCLUSIVE, LM_FLAG_TRY, LM_FLAG_TRY, &al->al_rgd_gh);
&al->al_rgd_gh);
switch (error) { switch (error) {
case 0: case 0:
if (try_rgrp_fit(rgd, al)) if (try_rgrp_fit(rgd, al))
...@@ -934,8 +932,7 @@ static int get_local_rgrp(struct gfs2_inode *ip) ...@@ -934,8 +932,7 @@ static int get_local_rgrp(struct gfs2_inode *ip)
begin = rgd = forward_rgrp_get(sdp); begin = rgd = forward_rgrp_get(sdp);
for (;;) { for (;;) {
error = gfs2_glock_nq_init(rgd->rd_gl, error = gfs2_glock_nq_init(rgd->rd_gl, LM_ST_EXCLUSIVE, flags,
LM_ST_EXCLUSIVE, flags,
&al->al_rgd_gh); &al->al_rgd_gh);
switch (error) { switch (error) {
case 0: case 0:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment