Loading fs/nfs/nfs4proc.c +37 −8 Original line number Original line Diff line number Diff line Loading @@ -4013,6 +4013,16 @@ static void nfs4_init_boot_verifier(const struct nfs_client *clp, memcpy(bootverf->data, verf, sizeof(bootverf->data)); memcpy(bootverf->data, verf, sizeof(bootverf->data)); } } /** * nfs4_proc_setclientid - Negotiate client ID * @clp: state data structure * @program: RPC program for NFSv4 callback service * @port: IP port number for NFS4 callback service * @cred: RPC credential to use for this call * @res: where to place the result * * Returns zero, a negative errno, or a negative NFS4ERR status code. */ int nfs4_proc_setclientid(struct nfs_client *clp, u32 program, int nfs4_proc_setclientid(struct nfs_client *clp, u32 program, unsigned short port, struct rpc_cred *cred, unsigned short port, struct rpc_cred *cred, struct nfs4_setclientid_res *res) struct nfs4_setclientid_res *res) Loading @@ -4029,6 +4039,7 @@ int nfs4_proc_setclientid(struct nfs_client *clp, u32 program, .rpc_resp = res, .rpc_resp = res, .rpc_cred = cred, .rpc_cred = cred, }; }; int status; /* nfs_client_id4 */ /* nfs_client_id4 */ nfs4_init_boot_verifier(clp, &sc_verifier); nfs4_init_boot_verifier(clp, &sc_verifier); Loading @@ -4050,9 +4061,22 @@ int nfs4_proc_setclientid(struct nfs_client *clp, u32 program, sizeof(setclientid.sc_uaddr), "%s.%u.%u", sizeof(setclientid.sc_uaddr), "%s.%u.%u", clp->cl_ipaddr, port >> 8, port & 255); clp->cl_ipaddr, port >> 8, port & 255); return rpc_call_sync(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT); dprintk("NFS call setclientid auth=%s, '%.*s'\n", clp->cl_rpcclient->cl_auth->au_ops->au_name, setclientid.sc_name_len, setclientid.sc_name); status = rpc_call_sync(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT); dprintk("NFS reply setclientid: %d\n", status); return status; } } /** * nfs4_proc_setclientid_confirm - Confirm client ID * @clp: state data structure * @res: result of a previous SETCLIENTID * @cred: RPC credential to use for this call * * Returns zero, a negative errno, or a negative NFS4ERR status code. */ int nfs4_proc_setclientid_confirm(struct nfs_client *clp, int nfs4_proc_setclientid_confirm(struct nfs_client *clp, struct nfs4_setclientid_res *arg, struct nfs4_setclientid_res *arg, struct rpc_cred *cred) struct rpc_cred *cred) Loading @@ -4067,6 +4091,9 @@ int nfs4_proc_setclientid_confirm(struct nfs_client *clp, unsigned long now; unsigned long now; int status; int status; dprintk("NFS call setclientid_confirm auth=%s, (client ID %llx)\n", clp->cl_rpcclient->cl_auth->au_ops->au_name, clp->cl_clientid); now = jiffies; now = jiffies; status = rpc_call_sync(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT); status = rpc_call_sync(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT); if (status == 0) { if (status == 0) { Loading @@ -4075,6 +4102,7 @@ int nfs4_proc_setclientid_confirm(struct nfs_client *clp, clp->cl_last_renewal = now; clp->cl_last_renewal = now; spin_unlock(&clp->cl_lock); spin_unlock(&clp->cl_lock); } } dprintk("NFS reply setclientid_confirm: %d\n", status); return status; return status; } } Loading Loading @@ -5218,6 +5246,8 @@ int nfs4_proc_bind_conn_to_session(struct nfs_client *clp, struct rpc_cred *cred /* /* * nfs4_proc_exchange_id() * nfs4_proc_exchange_id() * * * Returns zero, a negative errno, or a negative NFS4ERR status code. * * Since the clientid has expired, all compounds using sessions * Since the clientid has expired, all compounds using sessions * associated with the stale clientid will be returning * associated with the stale clientid will be returning * NFS4ERR_BADSESSION in the sequence operation, and will therefore * NFS4ERR_BADSESSION in the sequence operation, and will therefore Loading @@ -5242,15 +5272,14 @@ int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred) .rpc_cred = cred, .rpc_cred = cred, }; }; dprintk("--> %s\n", __func__); BUG_ON(clp == NULL); nfs4_init_boot_verifier(clp, &verifier); nfs4_init_boot_verifier(clp, &verifier); args.id_len = scnprintf(args.id, sizeof(args.id), args.id_len = scnprintf(args.id, sizeof(args.id), "%s/%s", "%s/%s", clp->cl_ipaddr, clp->cl_ipaddr, clp->cl_rpcclient->cl_nodename); clp->cl_rpcclient->cl_nodename); dprintk("NFS call exchange_id auth=%s, '%.*s'\n", clp->cl_rpcclient->cl_auth->au_ops->au_name, args.id_len, args.id); res.server_owner = kzalloc(sizeof(struct nfs41_server_owner), res.server_owner = kzalloc(sizeof(struct nfs41_server_owner), GFP_NOFS); GFP_NOFS); Loading Loading @@ -5313,12 +5342,12 @@ int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred) kfree(res.server_scope); kfree(res.server_scope); out: out: if (clp->cl_implid != NULL) if (clp->cl_implid != NULL) dprintk("%s: Server Implementation ID: " dprintk("NFS reply exchange_id: Server Implementation ID: " "domain: %s, name: %s, date: %llu,%u\n", "domain: %s, name: %s, date: %llu,%u\n", __func__, clp->cl_implid->domain, clp->cl_implid->name, clp->cl_implid->domain, clp->cl_implid->name, clp->cl_implid->date.seconds, clp->cl_implid->date.seconds, clp->cl_implid->date.nseconds); clp->cl_implid->date.nseconds); dprintk("<-- %s status= %d\n", __func__, status); dprintk("NFS reply exchange_id: %d\n", status); return status; return status; } } Loading fs/nfs/nfs4state.c +4 −0 Original line number Original line Diff line number Diff line Loading @@ -1665,6 +1665,10 @@ static int nfs4_establish_lease(struct nfs_client *clp) return 0; return 0; } } /* * Returns zero or a negative errno. NFS4ERR values are converted * to local errno values. */ static int nfs4_reclaim_lease(struct nfs_client *clp) static int nfs4_reclaim_lease(struct nfs_client *clp) { { int status; int status; Loading Loading
fs/nfs/nfs4proc.c +37 −8 Original line number Original line Diff line number Diff line Loading @@ -4013,6 +4013,16 @@ static void nfs4_init_boot_verifier(const struct nfs_client *clp, memcpy(bootverf->data, verf, sizeof(bootverf->data)); memcpy(bootverf->data, verf, sizeof(bootverf->data)); } } /** * nfs4_proc_setclientid - Negotiate client ID * @clp: state data structure * @program: RPC program for NFSv4 callback service * @port: IP port number for NFS4 callback service * @cred: RPC credential to use for this call * @res: where to place the result * * Returns zero, a negative errno, or a negative NFS4ERR status code. */ int nfs4_proc_setclientid(struct nfs_client *clp, u32 program, int nfs4_proc_setclientid(struct nfs_client *clp, u32 program, unsigned short port, struct rpc_cred *cred, unsigned short port, struct rpc_cred *cred, struct nfs4_setclientid_res *res) struct nfs4_setclientid_res *res) Loading @@ -4029,6 +4039,7 @@ int nfs4_proc_setclientid(struct nfs_client *clp, u32 program, .rpc_resp = res, .rpc_resp = res, .rpc_cred = cred, .rpc_cred = cred, }; }; int status; /* nfs_client_id4 */ /* nfs_client_id4 */ nfs4_init_boot_verifier(clp, &sc_verifier); nfs4_init_boot_verifier(clp, &sc_verifier); Loading @@ -4050,9 +4061,22 @@ int nfs4_proc_setclientid(struct nfs_client *clp, u32 program, sizeof(setclientid.sc_uaddr), "%s.%u.%u", sizeof(setclientid.sc_uaddr), "%s.%u.%u", clp->cl_ipaddr, port >> 8, port & 255); clp->cl_ipaddr, port >> 8, port & 255); return rpc_call_sync(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT); dprintk("NFS call setclientid auth=%s, '%.*s'\n", clp->cl_rpcclient->cl_auth->au_ops->au_name, setclientid.sc_name_len, setclientid.sc_name); status = rpc_call_sync(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT); dprintk("NFS reply setclientid: %d\n", status); return status; } } /** * nfs4_proc_setclientid_confirm - Confirm client ID * @clp: state data structure * @res: result of a previous SETCLIENTID * @cred: RPC credential to use for this call * * Returns zero, a negative errno, or a negative NFS4ERR status code. */ int nfs4_proc_setclientid_confirm(struct nfs_client *clp, int nfs4_proc_setclientid_confirm(struct nfs_client *clp, struct nfs4_setclientid_res *arg, struct nfs4_setclientid_res *arg, struct rpc_cred *cred) struct rpc_cred *cred) Loading @@ -4067,6 +4091,9 @@ int nfs4_proc_setclientid_confirm(struct nfs_client *clp, unsigned long now; unsigned long now; int status; int status; dprintk("NFS call setclientid_confirm auth=%s, (client ID %llx)\n", clp->cl_rpcclient->cl_auth->au_ops->au_name, clp->cl_clientid); now = jiffies; now = jiffies; status = rpc_call_sync(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT); status = rpc_call_sync(clp->cl_rpcclient, &msg, RPC_TASK_TIMEOUT); if (status == 0) { if (status == 0) { Loading @@ -4075,6 +4102,7 @@ int nfs4_proc_setclientid_confirm(struct nfs_client *clp, clp->cl_last_renewal = now; clp->cl_last_renewal = now; spin_unlock(&clp->cl_lock); spin_unlock(&clp->cl_lock); } } dprintk("NFS reply setclientid_confirm: %d\n", status); return status; return status; } } Loading Loading @@ -5218,6 +5246,8 @@ int nfs4_proc_bind_conn_to_session(struct nfs_client *clp, struct rpc_cred *cred /* /* * nfs4_proc_exchange_id() * nfs4_proc_exchange_id() * * * Returns zero, a negative errno, or a negative NFS4ERR status code. * * Since the clientid has expired, all compounds using sessions * Since the clientid has expired, all compounds using sessions * associated with the stale clientid will be returning * associated with the stale clientid will be returning * NFS4ERR_BADSESSION in the sequence operation, and will therefore * NFS4ERR_BADSESSION in the sequence operation, and will therefore Loading @@ -5242,15 +5272,14 @@ int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred) .rpc_cred = cred, .rpc_cred = cred, }; }; dprintk("--> %s\n", __func__); BUG_ON(clp == NULL); nfs4_init_boot_verifier(clp, &verifier); nfs4_init_boot_verifier(clp, &verifier); args.id_len = scnprintf(args.id, sizeof(args.id), args.id_len = scnprintf(args.id, sizeof(args.id), "%s/%s", "%s/%s", clp->cl_ipaddr, clp->cl_ipaddr, clp->cl_rpcclient->cl_nodename); clp->cl_rpcclient->cl_nodename); dprintk("NFS call exchange_id auth=%s, '%.*s'\n", clp->cl_rpcclient->cl_auth->au_ops->au_name, args.id_len, args.id); res.server_owner = kzalloc(sizeof(struct nfs41_server_owner), res.server_owner = kzalloc(sizeof(struct nfs41_server_owner), GFP_NOFS); GFP_NOFS); Loading Loading @@ -5313,12 +5342,12 @@ int nfs4_proc_exchange_id(struct nfs_client *clp, struct rpc_cred *cred) kfree(res.server_scope); kfree(res.server_scope); out: out: if (clp->cl_implid != NULL) if (clp->cl_implid != NULL) dprintk("%s: Server Implementation ID: " dprintk("NFS reply exchange_id: Server Implementation ID: " "domain: %s, name: %s, date: %llu,%u\n", "domain: %s, name: %s, date: %llu,%u\n", __func__, clp->cl_implid->domain, clp->cl_implid->name, clp->cl_implid->domain, clp->cl_implid->name, clp->cl_implid->date.seconds, clp->cl_implid->date.seconds, clp->cl_implid->date.nseconds); clp->cl_implid->date.nseconds); dprintk("<-- %s status= %d\n", __func__, status); dprintk("NFS reply exchange_id: %d\n", status); return status; return status; } } Loading
fs/nfs/nfs4state.c +4 −0 Original line number Original line Diff line number Diff line Loading @@ -1665,6 +1665,10 @@ static int nfs4_establish_lease(struct nfs_client *clp) return 0; return 0; } } /* * Returns zero or a negative errno. NFS4ERR values are converted * to local errno values. */ static int nfs4_reclaim_lease(struct nfs_client *clp) static int nfs4_reclaim_lease(struct nfs_client *clp) { { int status; int status; Loading