From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Teigland Date: Thu, 2 Aug 2007 08:39:07 -0500 Subject: [Cluster-devel] [PATCH] [GFS2] Clean up run_queue() In-Reply-To: <11857879472203-git-send-email-swhiteho@redhat.com> References: <11857879381186-git-send-email-swhiteho@redhat.com> <1185787946183-git-send-email-swhiteho@redhat.com> <11857879472203-git-send-email-swhiteho@redhat.com> Message-ID: <20070802133907.GA32611@redhat.com> List-Id: To: cluster-devel.redhat.com MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit On Mon, Jul 30, 2007 at 10:32:15AM +0100, Steven Whitehouse wrote: > A further clean up to make the logic a bit more obvious and > remove a local variable which is no longer required. > > Signed-off-by: Steven Whitehouse > > diff --git a/fs/gfs2/glock.c b/fs/gfs2/glock.c > index 65d6eba..79d61ff 100644 > --- a/fs/gfs2/glock.c > +++ b/fs/gfs2/glock.c > @@ -564,24 +564,19 @@ static int rq_demote(struct gfs2_glock *gl) > */ > static void run_queue(struct gfs2_glock *gl) > { > - int blocked; > - > - for (;;) { > - blocked = 1; > - if (test_bit(GLF_LOCK, &gl->gl_flags)) > - break; > - > + while(test_bit(GLF_LOCK, &gl->gl_flags) == 0) { CodingStyle requires a space after while