From 01f34226f3b179107b7dcce1f51ca94da589e4fe Mon Sep 17 00:00:00 2001 From: Chuck Lever Date: Tue, 15 May 2012 17:42:08 -0400 Subject: [PATCH] --- yaml --- r: 309835 b: refs/heads/master c: f07ea10dc8f20dfc215b15b012741fcf9f5aa17b h: refs/heads/master i: 309833: 8db9ca31462c4dcf7bb2943ab44b25863ed2a297 309831: c0b3eb3226f22d1d31ab3138812d25be6512fbfd v: v3 --- [refs] | 2 +- trunk/fs/nfsd/nfs4state.c | 14 ++------------ 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/[refs] b/[refs] index 18bc64cdb28e..c6581b80e328 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8dbf28e495337b0c66657e3e278ae0ff175b7140 +refs/heads/master: f07ea10dc8f20dfc215b15b012741fcf9f5aa17b diff --git a/trunk/fs/nfsd/nfs4state.c b/trunk/fs/nfsd/nfs4state.c index 064f61acfe00..91aec738e8fd 100644 --- a/trunk/fs/nfsd/nfs4state.c +++ b/trunk/fs/nfsd/nfs4state.c @@ -2214,7 +2214,6 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, struct nfsd4_setclientid_confirm *setclientid_confirm) { - struct sockaddr *sa = svc_addr(rqstp); struct nfs4_client *conf, *unconf; nfs4_verifier confirm = setclientid_confirm->sc_confirm; clientid_t * clid = &setclientid_confirm->sc_clientid; @@ -2232,17 +2231,12 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp, conf = find_confirmed_client(clid); unconf = find_unconfirmed_client(clid); - status = nfserr_clid_inuse; - if (conf && !rpc_cmp_addr((struct sockaddr *) &conf->cl_addr, sa)) - goto out; - if (unconf && !rpc_cmp_addr((struct sockaddr *) &unconf->cl_addr, sa)) - goto out; - /* * section 14.2.34 of RFC 3530 has a description of * SETCLIENTID_CONFIRM request processing consisting * of 4 bullet points, labeled as CASE1 - CASE4 below. */ + status = nfserr_clid_inuse; if (conf && unconf && same_verf(&confirm, &unconf->cl_confirm)) { /* * RFC 3530 14.2.34 CASE 1: @@ -2255,7 +2249,6 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp, nfsd4_probe_callback(conf); expire_client(unconf); status = nfs_ok; - } } else if (conf && !unconf) { /* @@ -2297,11 +2290,8 @@ nfsd4_setclientid_confirm(struct svc_rqst *rqstp, * Client probably hasn't noticed that we rebooted yet. */ status = nfserr_stale_clientid; - } else { - /* check that we have hit one of the cases...*/ - status = nfserr_clid_inuse; } -out: + nfs4_unlock_state(); return status; }