From eed940b57884741bc6ca1c5b6c264570c2d0352b Mon Sep 17 00:00:00 2001 From: Bob Peterson Date: Mon, 14 Nov 2011 10:45:40 -0500 Subject: [PATCH] --- yaml --- r: 280333 b: refs/heads/master c: c688b8b334d20acbc79b0383af2816ecf7365741 h: refs/heads/master i: 280331: 32ddcbb0159a697e3b6b6335751eb6825d38cf09 v: v3 --- [refs] | 2 +- trunk/fs/gfs2/rgrp.c | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 31a0dc77304f..a48f8454d221 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 79c4c379c8f16a12c28ea2084db5138e33d17ebd +refs/heads/master: c688b8b334d20acbc79b0383af2816ecf7365741 diff --git a/trunk/fs/gfs2/rgrp.c b/trunk/fs/gfs2/rgrp.c index 96bd6d759f29..a1a815b691cd 100644 --- a/trunk/fs/gfs2/rgrp.c +++ b/trunk/fs/gfs2/rgrp.c @@ -978,7 +978,7 @@ static int get_local_rgrp(struct gfs2_inode *ip, u64 *last_unlinked) struct gfs2_sbd *sdp = GFS2_SB(&ip->i_inode); struct gfs2_rgrpd *rgd, *begin = NULL; struct gfs2_alloc *al = ip->i_alloc; - int error, rg_locked; + int error, rg_locked, flags = LM_FLAG_TRY; int loops = 0; if (ip->i_rgd && rgrp_contains_block(ip->i_rgd, ip->i_goal)) @@ -997,7 +997,7 @@ static int get_local_rgrp(struct gfs2_inode *ip, u64 *last_unlinked) error = 0; } else { error = gfs2_glock_nq_init(rgd->rd_gl, LM_ST_EXCLUSIVE, - LM_FLAG_TRY, &al->al_rgd_gh); + flags, &al->al_rgd_gh); } switch (error) { case 0: @@ -1012,8 +1012,10 @@ static int get_local_rgrp(struct gfs2_inode *ip, u64 *last_unlinked) /* fall through */ case GLR_TRYFAILED: rgd = gfs2_rgrpd_get_next(rgd); - if (rgd == begin) + if (rgd == begin) { + flags = 0; loops++; + } break; default: return error;