linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: Dan Carpenter <error27@gmail.com>
Cc: Trond Myklebust <Trond.Myklebust@netapp.com>,
	"J. Bruce Fields" <bfields@fieldses.org>,
	Neil Brown <neilb@suse.de>,
	linux-nfs@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: Re: [patch -next] lockd: double unlock in next_host_state()
Date: Mon, 3 Jan 2011 10:59:36 -0500	[thread overview]
Message-ID: <001458D4-F513-4959-9BE7-476F8542D009@oracle.com> (raw)
In-Reply-To: <20110102202042.GN1886@bicker>


On Jan 2, 2011, at 3:20 PM, Dan Carpenter wrote:

> We unlock again after we goto out.
> 
> Signed-off-by: Dan Carpenter <error27@gmail.com>
> 
> diff --git a/fs/lockd/host.c b/fs/lockd/host.c
> index c106d6a..5f1bcb2 100644
> --- a/fs/lockd/host.c
> +++ b/fs/lockd/host.c
> @@ -532,7 +532,6 @@ static struct nlm_host *next_host_state(struct hlist_head *cache,
> 			host->h_state++;
> 
> 			nlm_get_host(host);
> -			mutex_unlock(&nlm_host_mutex);
> 			goto out;
> 		}
> 	}

Would it also make sense to replace the "goto out;" with a "break;" ?

-- 
Chuck Lever
chuck[dot]lever[at]oracle[dot]com





  reply	other threads:[~2011-01-03 16:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-02 20:20 [patch -next] lockd: double unlock in next_host_state() Dan Carpenter
2011-01-03 15:59 ` Chuck Lever [this message]
2011-01-03 16:34   ` Dan Carpenter

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=001458D4-F513-4959-9BE7-476F8542D009@oracle.com \
    --to=chuck.lever@oracle.com \
    --cc=Trond.Myklebust@netapp.com \
    --cc=bfields@fieldses.org \
    --cc=error27@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=neilb@suse.de \
    /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).