diff options
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r-- | fs/nfs/nfs4proc.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 4d7a8b9e1291..59e8bf5b10bb 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -4532,6 +4532,36 @@ out: | |||
4532 | return status; | 4532 | return status; |
4533 | } | 4533 | } |
4534 | 4534 | ||
4535 | /* | ||
4536 | * Issue the over-the-wire RPC DESTROY_SESSION. | ||
4537 | * The caller must serialize access to this routine. | ||
4538 | */ | ||
4539 | int nfs4_proc_destroy_session(struct nfs4_session *session) | ||
4540 | { | ||
4541 | int status = 0; | ||
4542 | struct rpc_message msg; | ||
4543 | |||
4544 | dprintk("--> nfs4_proc_destroy_session\n"); | ||
4545 | |||
4546 | /* session is still being setup */ | ||
4547 | if (session->clp->cl_cons_state != NFS_CS_READY) | ||
4548 | return status; | ||
4549 | |||
4550 | msg.rpc_proc = &nfs4_procedures[NFSPROC4_CLNT_DESTROY_SESSION]; | ||
4551 | msg.rpc_argp = session; | ||
4552 | msg.rpc_resp = NULL; | ||
4553 | msg.rpc_cred = NULL; | ||
4554 | status = rpc_call_sync(session->clp->cl_rpcclient, &msg, 0); | ||
4555 | |||
4556 | if (status) | ||
4557 | printk(KERN_WARNING | ||
4558 | "Got error %d from the server on DESTROY_SESSION. " | ||
4559 | "Session has been destroyed regardless...\n", status); | ||
4560 | |||
4561 | dprintk("<-- nfs4_proc_destroy_session\n"); | ||
4562 | return status; | ||
4563 | } | ||
4564 | |||
4535 | #endif /* CONFIG_NFS_V4_1 */ | 4565 | #endif /* CONFIG_NFS_V4_1 */ |
4536 | 4566 | ||
4537 | struct nfs4_state_recovery_ops nfs4_reboot_recovery_ops = { | 4567 | struct nfs4_state_recovery_ops nfs4_reboot_recovery_ops = { |