cluster-devel.redhat.com archive mirror
 help / color / mirror / Atom feed
From: Steven Whitehouse <swhiteho@redhat.com>
To: cluster-devel.redhat.com
Subject: [Cluster-devel] gfs2: fix skip unlock condition
Date: Fri, 04 Jan 2013 10:58:43 +0000	[thread overview]
Message-ID: <1357297123.2700.3.camel@menhir> (raw)
In-Reply-To: <20130103225207.GB5064@redhat.com>

Hi,

Now in the -nmw tree. Thanks,

Steve.

On Thu, 2013-01-03 at 17:52 -0500, David Teigland wrote:
> The recent commit fb6791d100d1bba20b5cdbc4912e1f7086ec60f8
> included the wrong logic.  The lvbptr check was incorrectly
> added after the patch was tested.
> 
> Signed-off-by: David Teigland <teigland@redhat.com>
> ---
>  fs/gfs2/lock_dlm.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/gfs2/lock_dlm.c b/fs/gfs2/lock_dlm.c
> index b906ed1..9802de0 100644
> --- a/fs/gfs2/lock_dlm.c
> +++ b/fs/gfs2/lock_dlm.c
> @@ -281,6 +281,7 @@ static void gdlm_put_lock(struct gfs2_glock *gl)
>  {
>  	struct gfs2_sbd *sdp = gl->gl_sbd;
>  	struct lm_lockstruct *ls = &sdp->sd_lockstruct;
> +	int lvb_needs_unlock = 0;
>  	int error;
>  
>  	if (gl->gl_lksb.sb_lkid == 0) {
> @@ -294,8 +295,12 @@ static void gdlm_put_lock(struct gfs2_glock *gl)
>  	gfs2_update_request_times(gl);
>  
>  	/* don't want to skip dlm_unlock writing the lvb when lock is ex */
> +
> +	if (gl->gl_lksb.sb_lvbptr && (gl->gl_state == LM_ST_EXCLUSIVE))
> +		lvb_needs_unlock = 1;
> +
>  	if (test_bit(SDF_SKIP_DLM_UNLOCK, &sdp->sd_flags) &&
> -	    gl->gl_lksb.sb_lvbptr && (gl->gl_state != LM_ST_EXCLUSIVE)) {
> +	    !lvb_needs_unlock) {
>  		gfs2_glock_free(gl);
>  		return;
>  	}




      reply	other threads:[~2013-01-04 10:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-03 22:52 [Cluster-devel] gfs2: fix skip unlock condition David Teigland
2013-01-04 10:58 ` Steven Whitehouse [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1357297123.2700.3.camel@menhir \
    --to=swhiteho@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).