···1550155015511551 strhashval = clientstr_hashval(dname);1552155215531553+ /* Cases below refer to rfc 5661 section 18.35.4: */15531554 nfs4_lock_state();15541555 conf = find_confirmed_client_by_str(dname, strhashval);15551556 if (conf) {···15581557 bool verfs_match = same_verf(&verf, &conf->cl_verifier);1559155815601559 if (!clp_used_exchangeid(conf)) {15611561- if (update) {15621562- status = nfserr_inval; /* buggy client */15601560+ if (update) { /* buggy client */15611561+ status = nfserr_inval;15631562 goto out;15641563 }15651564 }15661566- if (!creds_match) {15671567- /* 18.35.4 case 9 */15651565+ if (!creds_match) { /* case 9 */15681566 if (update)15691567 status = nfserr_perm;15701568 else /* case 3 */15711569 status = nfserr_clid_inuse;15721570 goto out;15731571 }15741574- if (!verfs_match) {15751575- /* 18.35.4 case 8 */15721572+ if (!verfs_match) { /* case 8 */15761573 if (update) {15771574 status = nfserr_not_same;15781575 goto out;15791576 }15801580- /* Client reboot: destroy old state */15771577+ /* case 5, client reboot */15811578 expire_client(conf);15821579 goto out_new;15831580 }···15831584 status = nfserr_inval;15841585 goto out;15851586 }15861586- /*15871587- * Set bit when the owner id and verifier map to an already15881588- * confirmed client id (18.35.3).15891589- */15871587+ /* case 2 */15901588 exid->flags |= EXCHGID4_FLAG_CONFIRMED_R;15911591-15921592- /*15931593- * Falling into 18.35.4 case 2, possible router replay.15941594- * Leave confirmed record intact and return same result.15951595- */15961589 new = conf;15971590 goto out_copy;15981591 }1599159216001600- /* 18.35.4 case 7 */16011601- if (update) {15931593+ if (update) { /* case 7 */16021594 status = nfserr_noent;16031595 goto out;16041596 }1605159716061598 unconf = find_unconfirmed_client_by_str(dname, strhashval);16071607- if (unconf) {16081608- /*16091609- * Possible retry or client restart. Per 18.35.4 case 4,16101610- * a new unconfirmed record should be generated regardless16111611- * of whether any properties have changed.16121612- */15991599+ if (unconf) /* case 4, possible retry or client restart */16131600 expire_client(unconf);16141614- }1615160116021602+ /* case 1 (normal case) */16161603out_new:16171617- /* Normal case */16181604 new = create_client(exid->clname, dname, rqstp, &verf);16191605 if (new == NULL) {16201606 status = nfserr_jukebox;