aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2013-07-24 12:28:37 -0400
committerTrond Myklebust <Trond.Myklebust@netapp.com>2013-08-07 13:06:08 -0400
commit73d8bde5e4b658948be0d3df51b323ed323997a2 (patch)
tree73d1ac32491fedbd0f13b85e0fcb1b79597e07cd /fs/nfs/nfs4proc.c
parentd688f7b8f62857c252b886fa16e8b38b83cfaf7e (diff)
NFS: Never use user credentials for lease renewal
Never try to use a non-UID 0 user credential for lease management, as that credential can change out from under us. The server will block NFSv4 lease recovery with NFS4ERR_CLID_INUSE. Since the mechanism to acquire a credential for lease management is now the same for all minor versions, replace the minor version- specific callout with a single function. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 0e64cccda0ac..a187f4d83e98 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -6069,7 +6069,7 @@ int nfs4_destroy_clientid(struct nfs_client *clp)
6069 goto out; 6069 goto out;
6070 if (clp->cl_preserve_clid) 6070 if (clp->cl_preserve_clid)
6071 goto out; 6071 goto out;
6072 cred = nfs4_get_exchange_id_cred(clp); 6072 cred = nfs4_get_clid_cred(clp);
6073 ret = nfs4_proc_destroy_clientid(clp, cred); 6073 ret = nfs4_proc_destroy_clientid(clp, cred);
6074 if (cred) 6074 if (cred)
6075 put_rpccred(cred); 6075 put_rpccred(cred);
@@ -7363,7 +7363,6 @@ static const struct nfs4_state_recovery_ops nfs40_reboot_recovery_ops = {
7363 .recover_open = nfs4_open_reclaim, 7363 .recover_open = nfs4_open_reclaim,
7364 .recover_lock = nfs4_lock_reclaim, 7364 .recover_lock = nfs4_lock_reclaim,
7365 .establish_clid = nfs4_init_clientid, 7365 .establish_clid = nfs4_init_clientid,
7366 .get_clid_cred = nfs4_get_setclientid_cred,
7367 .detect_trunking = nfs40_discover_server_trunking, 7366 .detect_trunking = nfs40_discover_server_trunking,
7368}; 7367};
7369 7368
@@ -7374,7 +7373,6 @@ static const struct nfs4_state_recovery_ops nfs41_reboot_recovery_ops = {
7374 .recover_open = nfs4_open_reclaim, 7373 .recover_open = nfs4_open_reclaim,
7375 .recover_lock = nfs4_lock_reclaim, 7374 .recover_lock = nfs4_lock_reclaim,
7376 .establish_clid = nfs41_init_clientid, 7375 .establish_clid = nfs41_init_clientid,
7377 .get_clid_cred = nfs4_get_exchange_id_cred,
7378 .reclaim_complete = nfs41_proc_reclaim_complete, 7376 .reclaim_complete = nfs41_proc_reclaim_complete,
7379 .detect_trunking = nfs41_discover_server_trunking, 7377 .detect_trunking = nfs41_discover_server_trunking,
7380}; 7378};
@@ -7386,7 +7384,6 @@ static const struct nfs4_state_recovery_ops nfs40_nograce_recovery_ops = {
7386 .recover_open = nfs4_open_expired, 7384 .recover_open = nfs4_open_expired,
7387 .recover_lock = nfs4_lock_expired, 7385 .recover_lock = nfs4_lock_expired,
7388 .establish_clid = nfs4_init_clientid, 7386 .establish_clid = nfs4_init_clientid,
7389 .get_clid_cred = nfs4_get_setclientid_cred,
7390}; 7387};
7391 7388
7392#if defined(CONFIG_NFS_V4_1) 7389#if defined(CONFIG_NFS_V4_1)
@@ -7396,7 +7393,6 @@ static const struct nfs4_state_recovery_ops nfs41_nograce_recovery_ops = {
7396 .recover_open = nfs41_open_expired, 7393 .recover_open = nfs41_open_expired,
7397 .recover_lock = nfs41_lock_expired, 7394 .recover_lock = nfs41_lock_expired,
7398 .establish_clid = nfs41_init_clientid, 7395 .establish_clid = nfs41_init_clientid,
7399 .get_clid_cred = nfs4_get_exchange_id_cred,
7400}; 7396};
7401#endif /* CONFIG_NFS_V4_1 */ 7397#endif /* CONFIG_NFS_V4_1 */
7402 7398