aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/callback_proc.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/callback_proc.c')
-rw-r--r--fs/nfs/callback_proc.c29
1 files changed, 29 insertions, 0 deletions
diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
index b7da1f54da68..61b85306bb25 100644
--- a/fs/nfs/callback_proc.c
+++ b/fs/nfs/callback_proc.c
@@ -227,4 +227,33 @@ out:
227 return res->csr_status; 227 return res->csr_status;
228} 228}
229 229
230unsigned nfs4_callback_recallany(struct cb_recallanyargs *args, void *dummy)
231{
232 struct nfs_client *clp;
233 int status;
234 fmode_t flags = 0;
235
236 status = htonl(NFS4ERR_OP_NOT_IN_SESSION);
237 clp = nfs_find_client(args->craa_addr, 4);
238 if (clp == NULL)
239 goto out;
240
241 dprintk("NFS: RECALL_ANY callback request from %s\n",
242 rpc_peeraddr2str(clp->cl_rpcclient, RPC_DISPLAY_ADDR));
243
244 if (test_bit(RCA4_TYPE_MASK_RDATA_DLG, (const unsigned long *)
245 &args->craa_type_mask))
246 flags = FMODE_READ;
247 if (test_bit(RCA4_TYPE_MASK_WDATA_DLG, (const unsigned long *)
248 &args->craa_type_mask))
249 flags |= FMODE_WRITE;
250
251 if (flags)
252 nfs_expire_all_delegation_types(clp, flags);
253 status = htonl(NFS4_OK);
254out:
255 dprintk("%s: exit with status = %d\n", __func__, ntohl(status));
256 return status;
257}
258
230#endif /* CONFIG_NFS_V4_1 */ 259#endif /* CONFIG_NFS_V4_1 */