From: Jeff Layton <jlayton@redhat.com>
To: trond.myklebust@fys.uio.no, bfields@fieldses.org
Cc: linux-nfs@vger.kernel.org, nfsv4@linux-nfs.org,
linux-kernel@vger.kernel.org
Subject: [PATCH 1/3] nfs4: remove BKL from nfs_callback_up and nfs_callback_down
Date: Wed, 11 Jun 2008 10:03:10 -0400 [thread overview]
Message-ID: <1213192992-7635-2-git-send-email-jlayton@redhat.com> (raw)
In-Reply-To: <1213192992-7635-1-git-send-email-jlayton@redhat.com>
The nfs_callback_mutex is sufficient protection.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
fs/nfs/callback.c | 4 ----
1 files changed, 0 insertions(+), 4 deletions(-)
diff --git a/fs/nfs/callback.c b/fs/nfs/callback.c
index c1e7c83..9e713d2 100644
--- a/fs/nfs/callback.c
+++ b/fs/nfs/callback.c
@@ -105,7 +105,6 @@ int nfs_callback_up(void)
struct svc_rqst *rqstp;
int ret = 0;
- lock_kernel();
mutex_lock(&nfs_callback_mutex);
if (nfs_callback_info.users++ || nfs_callback_info.task != NULL)
goto out;
@@ -149,7 +148,6 @@ out:
if (serv)
svc_destroy(serv);
mutex_unlock(&nfs_callback_mutex);
- unlock_kernel();
return ret;
out_err:
dprintk("Couldn't create callback socket or server thread; err = %d\n",
@@ -163,13 +161,11 @@ out_err:
*/
void nfs_callback_down(void)
{
- lock_kernel();
mutex_lock(&nfs_callback_mutex);
nfs_callback_info.users--;
if (nfs_callback_info.users == 0 && nfs_callback_info.task != NULL)
kthread_stop(nfs_callback_info.task);
mutex_unlock(&nfs_callback_mutex);
- unlock_kernel();
}
static int nfs_callback_authenticate(struct svc_rqst *rqstp)
--
1.5.3.6
next prev parent reply other threads:[~2008-06-11 14:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-06-11 14:03 [PATCH 0/3] fix potential races in lockd and nfs4-callback startup/shutdown Jeff Layton
2008-06-11 14:03 ` Jeff Layton [this message]
2008-06-11 14:03 ` [PATCH 2/3] nfs4: fix potential race with rapid nfs_callback_up/down cycle Jeff Layton
2008-06-11 14:03 ` [PATCH 3/3] lockd: close potential race with rapid lockd_up/lockd_down cycle Jeff Layton
2008-06-13 17:53 ` J. Bruce Fields
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=1213192992-7635-2-git-send-email-jlayton@redhat.com \
--to=jlayton@redhat.com \
--cc=bfields@fieldses.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=nfsv4@linux-nfs.org \
--cc=trond.myklebust@fys.uio.no \
/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
Powered by JetHome