callback_proc.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611
  1. /*
  2. * linux/fs/nfs/callback_proc.c
  3. *
  4. * Copyright (C) 2004 Trond Myklebust
  5. *
  6. * NFSv4 callback procedures
  7. */
  8. #include <linux/nfs4.h>
  9. #include <linux/nfs_fs.h>
  10. #include <linux/slab.h>
  11. #include <linux/rcupdate.h>
  12. #include "nfs4_fs.h"
  13. #include "callback.h"
  14. #include "delegation.h"
  15. #include "internal.h"
  16. #include "pnfs.h"
  17. #include "nfs4session.h"
  18. #include "nfs4trace.h"
  19. #define NFSDBG_FACILITY NFSDBG_CALLBACK
  20. __be32 nfs4_callback_getattr(struct cb_getattrargs *args,
  21. struct cb_getattrres *res,
  22. struct cb_process_state *cps)
  23. {
  24. struct nfs_delegation *delegation;
  25. struct nfs_inode *nfsi;
  26. struct inode *inode;
  27. res->status = htonl(NFS4ERR_OP_NOT_IN_SESSION);
  28. if (!cps->clp) /* Always set for v4.0. Set in cb_sequence for v4.1 */
  29. goto out;
  30. res->bitmap[0] = res->bitmap[1] = 0;
  31. res->status = htonl(NFS4ERR_BADHANDLE);
  32. dprintk_rcu("NFS: GETATTR callback request from %s\n",
  33. rpc_peeraddr2str(cps->clp->cl_rpcclient, RPC_DISPLAY_ADDR));
  34. inode = nfs_delegation_find_inode(cps->clp, &args->fh);
  35. if (inode == NULL) {
  36. trace_nfs4_cb_getattr(cps->clp, &args->fh, NULL,
  37. -ntohl(res->status));
  38. goto out;
  39. }
  40. nfsi = NFS_I(inode);
  41. rcu_read_lock();
  42. delegation = rcu_dereference(nfsi->delegation);
  43. if (delegation == NULL || (delegation->type & FMODE_WRITE) == 0)
  44. goto out_iput;
  45. res->size = i_size_read(inode);
  46. res->change_attr = delegation->change_attr;
  47. if (nfsi->nrequests != 0)
  48. res->change_attr++;
  49. res->ctime = inode->i_ctime;
  50. res->mtime = inode->i_mtime;
  51. res->bitmap[0] = (FATTR4_WORD0_CHANGE|FATTR4_WORD0_SIZE) &
  52. args->bitmap[0];
  53. res->bitmap[1] = (FATTR4_WORD1_TIME_METADATA|FATTR4_WORD1_TIME_MODIFY) &
  54. args->bitmap[1];
  55. res->status = 0;
  56. out_iput:
  57. rcu_read_unlock();
  58. trace_nfs4_cb_getattr(cps->clp, &args->fh, inode, -ntohl(res->status));
  59. iput(inode);
  60. out:
  61. dprintk("%s: exit with status = %d\n", __func__, ntohl(res->status));
  62. return res->status;
  63. }
  64. __be32 nfs4_callback_recall(struct cb_recallargs *args, void *dummy,
  65. struct cb_process_state *cps)
  66. {
  67. struct inode *inode;
  68. __be32 res;
  69. res = htonl(NFS4ERR_OP_NOT_IN_SESSION);
  70. if (!cps->clp) /* Always set for v4.0. Set in cb_sequence for v4.1 */
  71. goto out;
  72. dprintk_rcu("NFS: RECALL callback request from %s\n",
  73. rpc_peeraddr2str(cps->clp->cl_rpcclient, RPC_DISPLAY_ADDR));
  74. res = htonl(NFS4ERR_BADHANDLE);
  75. inode = nfs_delegation_find_inode(cps->clp, &args->fh);
  76. if (inode == NULL) {
  77. trace_nfs4_cb_recall(cps->clp, &args->fh, NULL,
  78. &args->stateid, -ntohl(res));
  79. goto out;
  80. }
  81. /* Set up a helper thread to actually return the delegation */
  82. switch (nfs_async_inode_return_delegation(inode, &args->stateid)) {
  83. case 0:
  84. res = 0;
  85. break;
  86. case -ENOENT:
  87. res = htonl(NFS4ERR_BAD_STATEID);
  88. break;
  89. default:
  90. res = htonl(NFS4ERR_RESOURCE);
  91. }
  92. trace_nfs4_cb_recall(cps->clp, &args->fh, inode,
  93. &args->stateid, -ntohl(res));
  94. iput(inode);
  95. out:
  96. dprintk("%s: exit with status = %d\n", __func__, ntohl(res));
  97. return res;
  98. }
  99. #if defined(CONFIG_NFS_V4_1)
  100. /*
  101. * Lookup a layout by filehandle.
  102. *
  103. * Note: gets a refcount on the layout hdr and on its respective inode.
  104. * Caller must put the layout hdr and the inode.
  105. *
  106. * TODO: keep track of all layouts (and delegations) in a hash table
  107. * hashed by filehandle.
  108. */
  109. static struct pnfs_layout_hdr * get_layout_by_fh_locked(struct nfs_client *clp,
  110. struct nfs_fh *fh, nfs4_stateid *stateid)
  111. {
  112. struct nfs_server *server;
  113. struct inode *ino;
  114. struct pnfs_layout_hdr *lo;
  115. list_for_each_entry_rcu(server, &clp->cl_superblocks, client_link) {
  116. list_for_each_entry(lo, &server->layouts, plh_layouts) {
  117. if (!nfs4_stateid_match_other(&lo->plh_stateid, stateid))
  118. continue;
  119. if (nfs_compare_fh(fh, &NFS_I(lo->plh_inode)->fh))
  120. continue;
  121. ino = igrab(lo->plh_inode);
  122. if (!ino)
  123. break;
  124. spin_lock(&ino->i_lock);
  125. /* Is this layout in the process of being freed? */
  126. if (NFS_I(ino)->layout != lo) {
  127. spin_unlock(&ino->i_lock);
  128. iput(ino);
  129. break;
  130. }
  131. pnfs_get_layout_hdr(lo);
  132. spin_unlock(&ino->i_lock);
  133. return lo;
  134. }
  135. }
  136. return NULL;
  137. }
  138. static struct pnfs_layout_hdr * get_layout_by_fh(struct nfs_client *clp,
  139. struct nfs_fh *fh, nfs4_stateid *stateid)
  140. {
  141. struct pnfs_layout_hdr *lo;
  142. spin_lock(&clp->cl_lock);
  143. rcu_read_lock();
  144. lo = get_layout_by_fh_locked(clp, fh, stateid);
  145. rcu_read_unlock();
  146. spin_unlock(&clp->cl_lock);
  147. return lo;
  148. }
  149. /*
  150. * Enforce RFC5661 section 12.5.5.2.1. (Layout Recall and Return Sequencing)
  151. */
  152. static bool pnfs_check_stateid_sequence(struct pnfs_layout_hdr *lo,
  153. const nfs4_stateid *new)
  154. {
  155. u32 oldseq, newseq;
  156. oldseq = be32_to_cpu(lo->plh_stateid.seqid);
  157. newseq = be32_to_cpu(new->seqid);
  158. if (newseq > oldseq + 1)
  159. return false;
  160. return true;
  161. }
  162. static u32 initiate_file_draining(struct nfs_client *clp,
  163. struct cb_layoutrecallargs *args)
  164. {
  165. struct inode *ino;
  166. struct pnfs_layout_hdr *lo;
  167. u32 rv = NFS4ERR_NOMATCHING_LAYOUT;
  168. LIST_HEAD(free_me_list);
  169. lo = get_layout_by_fh(clp, &args->cbl_fh, &args->cbl_stateid);
  170. if (!lo) {
  171. trace_nfs4_cb_layoutrecall_file(clp, &args->cbl_fh, NULL,
  172. &args->cbl_stateid, -rv);
  173. goto out;
  174. }
  175. ino = lo->plh_inode;
  176. spin_lock(&ino->i_lock);
  177. if (!pnfs_check_stateid_sequence(lo, &args->cbl_stateid)) {
  178. rv = NFS4ERR_DELAY;
  179. goto unlock;
  180. }
  181. pnfs_set_layout_stateid(lo, &args->cbl_stateid, true);
  182. spin_unlock(&ino->i_lock);
  183. pnfs_layoutcommit_inode(ino, false);
  184. spin_lock(&ino->i_lock);
  185. /*
  186. * Enforce RFC5661 Section 12.5.5.2.1.5 (Bulk Recall and Return)
  187. */
  188. if (test_bit(NFS_LAYOUT_BULK_RECALL, &lo->plh_flags)) {
  189. rv = NFS4ERR_DELAY;
  190. goto unlock;
  191. }
  192. if (pnfs_mark_matching_lsegs_return(lo, &free_me_list,
  193. &args->cbl_range,
  194. be32_to_cpu(args->cbl_stateid.seqid))) {
  195. rv = NFS4_OK;
  196. goto unlock;
  197. }
  198. if (NFS_SERVER(ino)->pnfs_curr_ld->return_range) {
  199. NFS_SERVER(ino)->pnfs_curr_ld->return_range(lo,
  200. &args->cbl_range);
  201. }
  202. pnfs_mark_layout_returned_if_empty(lo);
  203. unlock:
  204. spin_unlock(&ino->i_lock);
  205. pnfs_free_lseg_list(&free_me_list);
  206. /* Free all lsegs that are attached to commit buckets */
  207. nfs_commit_inode(ino, 0);
  208. pnfs_put_layout_hdr(lo);
  209. trace_nfs4_cb_layoutrecall_file(clp, &args->cbl_fh, ino,
  210. &args->cbl_stateid, -rv);
  211. iput(ino);
  212. out:
  213. return rv;
  214. }
  215. static u32 initiate_bulk_draining(struct nfs_client *clp,
  216. struct cb_layoutrecallargs *args)
  217. {
  218. int stat;
  219. if (args->cbl_recall_type == RETURN_FSID)
  220. stat = pnfs_destroy_layouts_byfsid(clp, &args->cbl_fsid, true);
  221. else
  222. stat = pnfs_destroy_layouts_byclid(clp, true);
  223. if (stat != 0)
  224. return NFS4ERR_DELAY;
  225. return NFS4ERR_NOMATCHING_LAYOUT;
  226. }
  227. static u32 do_callback_layoutrecall(struct nfs_client *clp,
  228. struct cb_layoutrecallargs *args)
  229. {
  230. u32 res;
  231. dprintk("%s enter, type=%i\n", __func__, args->cbl_recall_type);
  232. if (args->cbl_recall_type == RETURN_FILE)
  233. res = initiate_file_draining(clp, args);
  234. else
  235. res = initiate_bulk_draining(clp, args);
  236. dprintk("%s returning %i\n", __func__, res);
  237. return res;
  238. }
  239. __be32 nfs4_callback_layoutrecall(struct cb_layoutrecallargs *args,
  240. void *dummy, struct cb_process_state *cps)
  241. {
  242. u32 res;
  243. dprintk("%s: -->\n", __func__);
  244. if (cps->clp)
  245. res = do_callback_layoutrecall(cps->clp, args);
  246. else
  247. res = NFS4ERR_OP_NOT_IN_SESSION;
  248. dprintk("%s: exit with status = %d\n", __func__, res);
  249. return cpu_to_be32(res);
  250. }
  251. static void pnfs_recall_all_layouts(struct nfs_client *clp)
  252. {
  253. struct cb_layoutrecallargs args;
  254. /* Pretend we got a CB_LAYOUTRECALL(ALL) */
  255. memset(&args, 0, sizeof(args));
  256. args.cbl_recall_type = RETURN_ALL;
  257. /* FIXME we ignore errors, what should we do? */
  258. do_callback_layoutrecall(clp, &args);
  259. }
  260. __be32 nfs4_callback_devicenotify(struct cb_devicenotifyargs *args,
  261. void *dummy, struct cb_process_state *cps)
  262. {
  263. int i;
  264. __be32 res = 0;
  265. struct nfs_client *clp = cps->clp;
  266. struct nfs_server *server = NULL;
  267. dprintk("%s: -->\n", __func__);
  268. if (!clp) {
  269. res = cpu_to_be32(NFS4ERR_OP_NOT_IN_SESSION);
  270. goto out;
  271. }
  272. for (i = 0; i < args->ndevs; i++) {
  273. struct cb_devicenotifyitem *dev = &args->devs[i];
  274. if (!server ||
  275. server->pnfs_curr_ld->id != dev->cbd_layout_type) {
  276. rcu_read_lock();
  277. list_for_each_entry_rcu(server, &clp->cl_superblocks, client_link)
  278. if (server->pnfs_curr_ld &&
  279. server->pnfs_curr_ld->id == dev->cbd_layout_type) {
  280. rcu_read_unlock();
  281. goto found;
  282. }
  283. rcu_read_unlock();
  284. dprintk("%s: layout type %u not found\n",
  285. __func__, dev->cbd_layout_type);
  286. continue;
  287. }
  288. found:
  289. nfs4_delete_deviceid(server->pnfs_curr_ld, clp, &dev->cbd_dev_id);
  290. }
  291. out:
  292. kfree(args->devs);
  293. dprintk("%s: exit with status = %u\n",
  294. __func__, be32_to_cpu(res));
  295. return res;
  296. }
  297. /*
  298. * Validate the sequenceID sent by the server.
  299. * Return success if the sequenceID is one more than what we last saw on
  300. * this slot, accounting for wraparound. Increments the slot's sequence.
  301. *
  302. * We don't yet implement a duplicate request cache, instead we set the
  303. * back channel ca_maxresponsesize_cached to zero. This is OK for now
  304. * since we only currently implement idempotent callbacks anyway.
  305. *
  306. * We have a single slot backchannel at this time, so we don't bother
  307. * checking the used_slots bit array on the table. The lower layer guarantees
  308. * a single outstanding callback request at a time.
  309. */
  310. static __be32
  311. validate_seqid(const struct nfs4_slot_table *tbl, const struct nfs4_slot *slot,
  312. const struct cb_sequenceargs * args)
  313. {
  314. dprintk("%s enter. slotid %u seqid %u, slot table seqid: %u\n",
  315. __func__, args->csa_slotid, args->csa_sequenceid, slot->seq_nr);
  316. if (args->csa_slotid > tbl->server_highest_slotid)
  317. return htonl(NFS4ERR_BADSLOT);
  318. /* Replay */
  319. if (args->csa_sequenceid == slot->seq_nr) {
  320. dprintk("%s seqid %u is a replay\n",
  321. __func__, args->csa_sequenceid);
  322. if (nfs4_test_locked_slot(tbl, slot->slot_nr))
  323. return htonl(NFS4ERR_DELAY);
  324. /* Signal process_op to set this error on next op */
  325. if (args->csa_cachethis == 0)
  326. return htonl(NFS4ERR_RETRY_UNCACHED_REP);
  327. /* Liar! We never allowed you to set csa_cachethis != 0 */
  328. return htonl(NFS4ERR_SEQ_FALSE_RETRY);
  329. }
  330. /* Wraparound */
  331. if (unlikely(slot->seq_nr == 0xFFFFFFFFU)) {
  332. if (args->csa_sequenceid == 1)
  333. return htonl(NFS4_OK);
  334. } else if (likely(args->csa_sequenceid == slot->seq_nr + 1))
  335. return htonl(NFS4_OK);
  336. /* Misordered request */
  337. return htonl(NFS4ERR_SEQ_MISORDERED);
  338. }
  339. /*
  340. * For each referring call triple, check the session's slot table for
  341. * a match. If the slot is in use and the sequence numbers match, the
  342. * client is still waiting for a response to the original request.
  343. */
  344. static bool referring_call_exists(struct nfs_client *clp,
  345. uint32_t nrclists,
  346. struct referring_call_list *rclists)
  347. {
  348. bool status = 0;
  349. int i, j;
  350. struct nfs4_session *session;
  351. struct nfs4_slot_table *tbl;
  352. struct referring_call_list *rclist;
  353. struct referring_call *ref;
  354. /*
  355. * XXX When client trunking is implemented, this becomes
  356. * a session lookup from within the loop
  357. */
  358. session = clp->cl_session;
  359. tbl = &session->fc_slot_table;
  360. for (i = 0; i < nrclists; i++) {
  361. rclist = &rclists[i];
  362. if (memcmp(session->sess_id.data,
  363. rclist->rcl_sessionid.data,
  364. NFS4_MAX_SESSIONID_LEN) != 0)
  365. continue;
  366. for (j = 0; j < rclist->rcl_nrefcalls; j++) {
  367. ref = &rclist->rcl_refcalls[j];
  368. dprintk("%s: sessionid %x:%x:%x:%x sequenceid %u "
  369. "slotid %u\n", __func__,
  370. ((u32 *)&rclist->rcl_sessionid.data)[0],
  371. ((u32 *)&rclist->rcl_sessionid.data)[1],
  372. ((u32 *)&rclist->rcl_sessionid.data)[2],
  373. ((u32 *)&rclist->rcl_sessionid.data)[3],
  374. ref->rc_sequenceid, ref->rc_slotid);
  375. spin_lock(&tbl->slot_tbl_lock);
  376. status = (test_bit(ref->rc_slotid, tbl->used_slots) &&
  377. tbl->slots[ref->rc_slotid].seq_nr ==
  378. ref->rc_sequenceid);
  379. spin_unlock(&tbl->slot_tbl_lock);
  380. if (status)
  381. goto out;
  382. }
  383. }
  384. out:
  385. return status;
  386. }
  387. __be32 nfs4_callback_sequence(struct cb_sequenceargs *args,
  388. struct cb_sequenceres *res,
  389. struct cb_process_state *cps)
  390. {
  391. struct nfs4_slot_table *tbl;
  392. struct nfs4_slot *slot;
  393. struct nfs_client *clp;
  394. int i;
  395. __be32 status = htonl(NFS4ERR_BADSESSION);
  396. clp = nfs4_find_client_sessionid(cps->net, args->csa_addr,
  397. &args->csa_sessionid, cps->minorversion);
  398. if (clp == NULL)
  399. goto out;
  400. if (!(clp->cl_session->flags & SESSION4_BACK_CHAN))
  401. goto out;
  402. tbl = &clp->cl_session->bc_slot_table;
  403. slot = tbl->slots + args->csa_slotid;
  404. /* Set up res before grabbing the spinlock */
  405. memcpy(&res->csr_sessionid, &args->csa_sessionid,
  406. sizeof(res->csr_sessionid));
  407. res->csr_sequenceid = args->csa_sequenceid;
  408. res->csr_slotid = args->csa_slotid;
  409. spin_lock(&tbl->slot_tbl_lock);
  410. /* state manager is resetting the session */
  411. if (test_bit(NFS4_SLOT_TBL_DRAINING, &tbl->slot_tbl_state)) {
  412. status = htonl(NFS4ERR_DELAY);
  413. /* Return NFS4ERR_BADSESSION if we're draining the session
  414. * in order to reset it.
  415. */
  416. if (test_bit(NFS4CLNT_SESSION_RESET, &clp->cl_state))
  417. status = htonl(NFS4ERR_BADSESSION);
  418. goto out_unlock;
  419. }
  420. status = htonl(NFS4ERR_BADSLOT);
  421. slot = nfs4_lookup_slot(tbl, args->csa_slotid);
  422. if (IS_ERR(slot))
  423. goto out_unlock;
  424. res->csr_highestslotid = tbl->server_highest_slotid;
  425. res->csr_target_highestslotid = tbl->target_highest_slotid;
  426. status = validate_seqid(tbl, slot, args);
  427. if (status)
  428. goto out_unlock;
  429. if (!nfs4_try_to_lock_slot(tbl, slot)) {
  430. status = htonl(NFS4ERR_DELAY);
  431. goto out_unlock;
  432. }
  433. cps->slot = slot;
  434. /* The ca_maxresponsesize_cached is 0 with no DRC */
  435. if (args->csa_cachethis != 0) {
  436. status = htonl(NFS4ERR_REP_TOO_BIG_TO_CACHE);
  437. goto out_unlock;
  438. }
  439. /*
  440. * Check for pending referring calls. If a match is found, a
  441. * related callback was received before the response to the original
  442. * call.
  443. */
  444. if (referring_call_exists(clp, args->csa_nrclists, args->csa_rclists)) {
  445. status = htonl(NFS4ERR_DELAY);
  446. goto out_unlock;
  447. }
  448. /*
  449. * RFC5661 20.9.3
  450. * If CB_SEQUENCE returns an error, then the state of the slot
  451. * (sequence ID, cached reply) MUST NOT change.
  452. */
  453. slot->seq_nr = args->csa_sequenceid;
  454. out_unlock:
  455. spin_unlock(&tbl->slot_tbl_lock);
  456. out:
  457. cps->clp = clp; /* put in nfs4_callback_compound */
  458. for (i = 0; i < args->csa_nrclists; i++)
  459. kfree(args->csa_rclists[i].rcl_refcalls);
  460. kfree(args->csa_rclists);
  461. if (status == htonl(NFS4ERR_RETRY_UNCACHED_REP)) {
  462. cps->drc_status = status;
  463. status = 0;
  464. } else
  465. res->csr_status = status;
  466. trace_nfs4_cb_sequence(args, res, status);
  467. dprintk("%s: exit with status = %d res->csr_status %d\n", __func__,
  468. ntohl(status), ntohl(res->csr_status));
  469. return status;
  470. }
  471. static bool
  472. validate_bitmap_values(unsigned long mask)
  473. {
  474. return (mask & ~RCA4_TYPE_MASK_ALL) == 0;
  475. }
  476. __be32 nfs4_callback_recallany(struct cb_recallanyargs *args, void *dummy,
  477. struct cb_process_state *cps)
  478. {
  479. __be32 status;
  480. fmode_t flags = 0;
  481. status = cpu_to_be32(NFS4ERR_OP_NOT_IN_SESSION);
  482. if (!cps->clp) /* set in cb_sequence */
  483. goto out;
  484. dprintk_rcu("NFS: RECALL_ANY callback request from %s\n",
  485. rpc_peeraddr2str(cps->clp->cl_rpcclient, RPC_DISPLAY_ADDR));
  486. status = cpu_to_be32(NFS4ERR_INVAL);
  487. if (!validate_bitmap_values(args->craa_type_mask))
  488. goto out;
  489. status = cpu_to_be32(NFS4_OK);
  490. if (test_bit(RCA4_TYPE_MASK_RDATA_DLG, (const unsigned long *)
  491. &args->craa_type_mask))
  492. flags = FMODE_READ;
  493. if (test_bit(RCA4_TYPE_MASK_WDATA_DLG, (const unsigned long *)
  494. &args->craa_type_mask))
  495. flags |= FMODE_WRITE;
  496. if (test_bit(RCA4_TYPE_MASK_FILE_LAYOUT, (const unsigned long *)
  497. &args->craa_type_mask))
  498. pnfs_recall_all_layouts(cps->clp);
  499. if (flags)
  500. nfs_expire_unused_delegation_types(cps->clp, flags);
  501. out:
  502. dprintk("%s: exit with status = %d\n", __func__, ntohl(status));
  503. return status;
  504. }
  505. /* Reduce the fore channel's max_slots to the target value */
  506. __be32 nfs4_callback_recallslot(struct cb_recallslotargs *args, void *dummy,
  507. struct cb_process_state *cps)
  508. {
  509. struct nfs4_slot_table *fc_tbl;
  510. __be32 status;
  511. status = htonl(NFS4ERR_OP_NOT_IN_SESSION);
  512. if (!cps->clp) /* set in cb_sequence */
  513. goto out;
  514. dprintk_rcu("NFS: CB_RECALL_SLOT request from %s target highest slotid %u\n",
  515. rpc_peeraddr2str(cps->clp->cl_rpcclient, RPC_DISPLAY_ADDR),
  516. args->crsa_target_highest_slotid);
  517. fc_tbl = &cps->clp->cl_session->fc_slot_table;
  518. status = htonl(NFS4_OK);
  519. nfs41_set_target_slotid(fc_tbl, args->crsa_target_highest_slotid);
  520. nfs41_notify_server(cps->clp);
  521. out:
  522. dprintk("%s: exit with status = %d\n", __func__, ntohl(status));
  523. return status;
  524. }
  525. #endif /* CONFIG_NFS_V4_1 */