aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/callback_proc.c
diff options
context:
space:
mode:
authorBenny Halevy <bhalevy@panasas.com>2009-04-01 09:23:25 -0400
committerBenny Halevy <bhalevy@panasas.com>2009-06-17 17:11:38 -0400
commitd49433e1e3bb144a5752ce2a8ba1139dc519df1a (patch)
tree65ec427fcab5fffedff5f5dced68c9424d2e204e /fs/nfs/callback_proc.c
parent2d9b9ec344b19b7b65c732b7000114df57684140 (diff)
nfs41: cb_sequence proc implementation
Currently, just free up any referring calls information. Signed-off-by: Benny Halevy <bhalevy@panasas.com> [nfs41: fix csr_{,target}highestslotid] Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Diffstat (limited to 'fs/nfs/callback_proc.c')
-rw-r--r--fs/nfs/callback_proc.c28
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 */
109unsigned 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 */