diff options
Diffstat (limited to 'fs/nfs/callback_proc.c')
-rw-r--r-- | fs/nfs/callback_proc.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c index f7e83e23cf9f..f731bbe7ac6a 100644 --- a/fs/nfs/callback_proc.c +++ b/fs/nfs/callback_proc.c | |||
@@ -101,3 +101,31 @@ out: | |||
101 | dprintk("%s: exit with status = %d\n", __func__, ntohl(res)); | 101 | dprintk("%s: exit with status = %d\n", __func__, ntohl(res)); |
102 | return res; | 102 | return res; |
103 | } | 103 | } |
104 | |||
105 | #if defined(CONFIG_NFS_V4_1) | ||
106 | |||
107 | /* FIXME: validate args->cbs_{sequence,slot}id */ | ||
108 | /* FIXME: referring calls should be processed */ | ||
109 | unsigned nfs4_callback_sequence(struct cb_sequenceargs *args, | ||
110 | struct cb_sequenceres *res) | ||
111 | { | ||
112 | int i; | ||
113 | unsigned status = 0; | ||
114 | |||
115 | for (i = 0; i < args->csa_nrclists; i++) | ||
116 | kfree(args->csa_rclists[i].rcl_refcalls); | ||
117 | kfree(args->csa_rclists); | ||
118 | |||
119 | memcpy(&res->csr_sessionid, &args->csa_sessionid, | ||
120 | sizeof(res->csr_sessionid)); | ||
121 | res->csr_sequenceid = args->csa_sequenceid; | ||
122 | res->csr_slotid = args->csa_slotid; | ||
123 | res->csr_highestslotid = NFS41_BC_MAX_CALLBACKS - 1; | ||
124 | res->csr_target_highestslotid = NFS41_BC_MAX_CALLBACKS - 1; | ||
125 | |||
126 | dprintk("%s: exit with status = %d\n", __func__, ntohl(status)); | ||
127 | res->csr_status = status; | ||
128 | return status; | ||
129 | } | ||
130 | |||
131 | #endif /* CONFIG_NFS_V4_1 */ | ||