From: "J. Bruce Fields" <bfields@redhat.com>
To: linux-nfs@vger.kernel.org
Cc: "J. Bruce Fields" <bfields@redhat.com>
Subject: [PATCH 1/9] nfsd4: warn on odd create_session state
Date: Thu, 21 Mar 2013 10:56:12 -0400 [thread overview]
Message-ID: <1363877780-28825-2-git-send-email-bfields@redhat.com> (raw)
In-Reply-To: <1363877780-28825-1-git-send-email-bfields@redhat.com>
From: "J. Bruce Fields" <bfields@redhat.com>
This should never happen.
(Note: the comparable case in setclientid_confirm *can* happen, since
updating a client record can result in both confirmed and unconfirmed
records with the same clientid.)
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
---
fs/nfsd/nfs4state.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index 2e27430..c5af45d 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -1784,6 +1784,7 @@ nfsd4_create_session(struct svc_rqst *rqstp,
nfs4_lock_state();
unconf = find_unconfirmed_client(&cr_ses->clientid, true, nn);
conf = find_confirmed_client(&cr_ses->clientid, true, nn);
+ WARN_ON_ONCE(conf && unconf);
if (conf) {
cs_slot = &conf->cl_cs_slot;
@@ -2125,6 +2126,7 @@ nfsd4_destroy_clientid(struct svc_rqst *rqstp, struct nfsd4_compound_state *csta
nfs4_lock_state();
unconf = find_unconfirmed_client(&dc->clientid, true, nn);
conf = find_confirmed_client(&dc->clientid, true, nn);
+ WARN_ON_ONCE(conf && unconf);
if (conf) {
clp = conf;
--
1.7.9.5
next prev parent reply other threads:[~2013-03-21 14:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-21 14:56 fix some nfsd4.1 state races for 3.10 J. Bruce Fields
2013-03-21 14:56 ` J. Bruce Fields [this message]
2013-03-21 14:56 ` [PATCH 2/9] nfsd4: STALE_STATEID cleanup J. Bruce Fields
2013-03-21 14:56 ` [PATCH 3/9] nfsd4: remove some dprintk's J. Bruce Fields
2013-03-21 14:56 ` [PATCH 4/9] nfsd4: destroy_clientid simplification J. Bruce Fields
2013-03-21 14:56 ` [PATCH 5/9] nfsd4: clientid lookup cleanup J. Bruce Fields
2013-03-21 14:56 ` [PATCH 6/9] nfsd4: fix destroy_session race J. Bruce Fields
2013-03-21 14:56 ` [PATCH 7/9] nfsd4: simplify bind_conn_to_session locking J. Bruce Fields
2013-03-21 14:56 ` [PATCH 8/9] nfsd4: don't destroy in-use clients J. Bruce Fields
2013-03-21 14:56 ` [PATCH 9/9] nfsd4: don't destroy in-use session 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=1363877780-28825-2-git-send-email-bfields@redhat.com \
--to=bfields@redhat.com \
--cc=linux-nfs@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.