From: Chuck Lever <chuck.lever@oracle.com>
To: linux-nfs@vger.kernel.org
Subject: [PATCH 2/3] NFS: Partially revert commit 845cbceb
Date: Fri, 07 Jun 2013 15:45:00 -0400 [thread overview]
Message-ID: <20130607194500.1296.15925.stgit@seurat.1015granger.net> (raw)
In-Reply-To: <20130607194140.1296.54746.stgit@seurat.1015granger.net>
I'm about to add logic that invokes nfs4_clear_machine_cred(), but
we removed it in 3.10. This is a separate commit to make it easier
to backport the next patch to a kernel that may still have
nfs4_clear_machine_cred().
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
fs/nfs/nfs4state.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index 1fab140..4949ce5 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -154,6 +154,18 @@ struct rpc_cred *nfs4_get_machine_cred_locked(struct nfs_client *clp)
return cred;
}
+static void nfs4_clear_machine_cred(struct nfs_client *clp)
+{
+ struct rpc_cred *cred;
+
+ spin_lock(&clp->cl_lock);
+ cred = clp->cl_machine_cred;
+ clp->cl_machine_cred = NULL;
+ spin_unlock(&clp->cl_lock);
+ if (cred != NULL)
+ put_rpccred(cred);
+}
+
static struct rpc_cred *
nfs4_get_renew_cred_server_locked(struct nfs_server *server)
{
next prev parent reply other threads:[~2013-06-07 19:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-07 19:44 [PATCH 0/3] Use root user credential for lease management Chuck Lever
2013-06-07 19:44 ` [PATCH 1/3] NFS: Never use user credentials for lease renewal Chuck Lever
2013-06-07 19:45 ` Chuck Lever [this message]
2013-06-07 19:45 ` [PATCH 3/3] NFS: Use root's credential for lease management when keytab is missing Chuck Lever
2013-06-07 19:52 ` Myklebust, Trond
2013-06-07 20:04 ` Chuck Lever
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=20130607194500.1296.15925.stgit@seurat.1015granger.net \
--to=chuck.lever@oracle.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 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).