proc.c 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649
  1. /*
  2. * linux/fs/nfs/proc.c
  3. *
  4. * Copyright (C) 1992, 1993, 1994 Rick Sladkey
  5. *
  6. * OS-independent nfs remote procedure call functions
  7. *
  8. * Tuned by Alan Cox <A.Cox@swansea.ac.uk> for >3K buffers
  9. * so at last we can have decent(ish) throughput off a
  10. * Sun server.
  11. *
  12. * Coding optimized and cleaned up by Florian La Roche.
  13. * Note: Error returns are optimized for NFS_OK, which isn't translated via
  14. * nfs_stat_to_errno(), but happens to be already the right return code.
  15. *
  16. * Also, the code currently doesn't check the size of the packet, when
  17. * it decodes the packet.
  18. *
  19. * Feel free to fix it and mail me the diffs if it worries you.
  20. *
  21. * Completely rewritten to support the new RPC call interface;
  22. * rewrote and moved the entire XDR stuff to xdr.c
  23. * --Olaf Kirch June 1996
  24. *
  25. * The code below initializes all auto variables explicitly, otherwise
  26. * it will fail to work as a module (gcc generates a memset call for an
  27. * incomplete struct).
  28. */
  29. #include <linux/types.h>
  30. #include <linux/param.h>
  31. #include <linux/slab.h>
  32. #include <linux/time.h>
  33. #include <linux/mm.h>
  34. #include <linux/utsname.h>
  35. #include <linux/errno.h>
  36. #include <linux/string.h>
  37. #include <linux/in.h>
  38. #include <linux/pagemap.h>
  39. #include <linux/sunrpc/clnt.h>
  40. #include <linux/nfs.h>
  41. #include <linux/nfs2.h>
  42. #include <linux/nfs_fs.h>
  43. #include <linux/nfs_page.h>
  44. #include <linux/lockd/bind.h>
  45. #include "internal.h"
  46. #define NFSDBG_FACILITY NFSDBG_PROC
  47. /*
  48. * Bare-bones access to getattr: this is for nfs_read_super.
  49. */
  50. static int
  51. nfs_proc_get_root(struct nfs_server *server, struct nfs_fh *fhandle,
  52. struct nfs_fsinfo *info)
  53. {
  54. struct nfs_fattr *fattr = info->fattr;
  55. struct nfs2_fsstat fsinfo;
  56. struct rpc_message msg = {
  57. .rpc_proc = &nfs_procedures[NFSPROC_GETATTR],
  58. .rpc_argp = fhandle,
  59. .rpc_resp = fattr,
  60. };
  61. int status;
  62. dprintk("%s: call getattr\n", __FUNCTION__);
  63. nfs_fattr_init(fattr);
  64. status = rpc_call_sync(server->nfs_client->cl_rpcclient, &msg, 0);
  65. dprintk("%s: reply getattr: %d\n", __FUNCTION__, status);
  66. if (status)
  67. return status;
  68. dprintk("%s: call statfs\n", __FUNCTION__);
  69. msg.rpc_proc = &nfs_procedures[NFSPROC_STATFS];
  70. msg.rpc_resp = &fsinfo;
  71. status = rpc_call_sync(server->nfs_client->cl_rpcclient, &msg, 0);
  72. dprintk("%s: reply statfs: %d\n", __FUNCTION__, status);
  73. if (status)
  74. return status;
  75. info->rtmax = NFS_MAXDATA;
  76. info->rtpref = fsinfo.tsize;
  77. info->rtmult = fsinfo.bsize;
  78. info->wtmax = NFS_MAXDATA;
  79. info->wtpref = fsinfo.tsize;
  80. info->wtmult = fsinfo.bsize;
  81. info->dtpref = fsinfo.tsize;
  82. info->maxfilesize = 0x7FFFFFFF;
  83. info->lease_time = 0;
  84. return 0;
  85. }
  86. /*
  87. * One function for each procedure in the NFS protocol.
  88. */
  89. static int
  90. nfs_proc_getattr(struct nfs_server *server, struct nfs_fh *fhandle,
  91. struct nfs_fattr *fattr)
  92. {
  93. struct rpc_message msg = {
  94. .rpc_proc = &nfs_procedures[NFSPROC_GETATTR],
  95. .rpc_argp = fhandle,
  96. .rpc_resp = fattr,
  97. };
  98. int status;
  99. dprintk("NFS call getattr\n");
  100. nfs_fattr_init(fattr);
  101. status = rpc_call_sync(server->client, &msg, 0);
  102. dprintk("NFS reply getattr: %d\n", status);
  103. return status;
  104. }
  105. static int
  106. nfs_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr,
  107. struct iattr *sattr)
  108. {
  109. struct inode *inode = dentry->d_inode;
  110. struct nfs_sattrargs arg = {
  111. .fh = NFS_FH(inode),
  112. .sattr = sattr
  113. };
  114. struct rpc_message msg = {
  115. .rpc_proc = &nfs_procedures[NFSPROC_SETATTR],
  116. .rpc_argp = &arg,
  117. .rpc_resp = fattr,
  118. };
  119. int status;
  120. /* Mask out the non-modebit related stuff from attr->ia_mode */
  121. sattr->ia_mode &= S_IALLUGO;
  122. dprintk("NFS call setattr\n");
  123. nfs_fattr_init(fattr);
  124. status = rpc_call_sync(NFS_CLIENT(inode), &msg, 0);
  125. if (status == 0)
  126. nfs_setattr_update_inode(inode, sattr);
  127. dprintk("NFS reply setattr: %d\n", status);
  128. return status;
  129. }
  130. static int
  131. nfs_proc_lookup(struct inode *dir, struct qstr *name,
  132. struct nfs_fh *fhandle, struct nfs_fattr *fattr)
  133. {
  134. struct nfs_diropargs arg = {
  135. .fh = NFS_FH(dir),
  136. .name = name->name,
  137. .len = name->len
  138. };
  139. struct nfs_diropok res = {
  140. .fh = fhandle,
  141. .fattr = fattr
  142. };
  143. struct rpc_message msg = {
  144. .rpc_proc = &nfs_procedures[NFSPROC_LOOKUP],
  145. .rpc_argp = &arg,
  146. .rpc_resp = &res,
  147. };
  148. int status;
  149. dprintk("NFS call lookup %s\n", name->name);
  150. nfs_fattr_init(fattr);
  151. status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
  152. dprintk("NFS reply lookup: %d\n", status);
  153. return status;
  154. }
  155. static int nfs_proc_readlink(struct inode *inode, struct page *page,
  156. unsigned int pgbase, unsigned int pglen)
  157. {
  158. struct nfs_readlinkargs args = {
  159. .fh = NFS_FH(inode),
  160. .pgbase = pgbase,
  161. .pglen = pglen,
  162. .pages = &page
  163. };
  164. struct rpc_message msg = {
  165. .rpc_proc = &nfs_procedures[NFSPROC_READLINK],
  166. .rpc_argp = &args,
  167. };
  168. int status;
  169. dprintk("NFS call readlink\n");
  170. status = rpc_call_sync(NFS_CLIENT(inode), &msg, 0);
  171. dprintk("NFS reply readlink: %d\n", status);
  172. return status;
  173. }
  174. static int
  175. nfs_proc_create(struct inode *dir, struct dentry *dentry, struct iattr *sattr,
  176. int flags, struct nameidata *nd)
  177. {
  178. struct nfs_fh fhandle;
  179. struct nfs_fattr fattr;
  180. struct nfs_createargs arg = {
  181. .fh = NFS_FH(dir),
  182. .name = dentry->d_name.name,
  183. .len = dentry->d_name.len,
  184. .sattr = sattr
  185. };
  186. struct nfs_diropok res = {
  187. .fh = &fhandle,
  188. .fattr = &fattr
  189. };
  190. struct rpc_message msg = {
  191. .rpc_proc = &nfs_procedures[NFSPROC_CREATE],
  192. .rpc_argp = &arg,
  193. .rpc_resp = &res,
  194. };
  195. int status;
  196. nfs_fattr_init(&fattr);
  197. dprintk("NFS call create %s\n", dentry->d_name.name);
  198. status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
  199. if (status == 0)
  200. status = nfs_instantiate(dentry, &fhandle, &fattr);
  201. dprintk("NFS reply create: %d\n", status);
  202. return status;
  203. }
  204. /*
  205. * In NFSv2, mknod is grafted onto the create call.
  206. */
  207. static int
  208. nfs_proc_mknod(struct inode *dir, struct dentry *dentry, struct iattr *sattr,
  209. dev_t rdev)
  210. {
  211. struct nfs_fh fhandle;
  212. struct nfs_fattr fattr;
  213. struct nfs_createargs arg = {
  214. .fh = NFS_FH(dir),
  215. .name = dentry->d_name.name,
  216. .len = dentry->d_name.len,
  217. .sattr = sattr
  218. };
  219. struct nfs_diropok res = {
  220. .fh = &fhandle,
  221. .fattr = &fattr
  222. };
  223. struct rpc_message msg = {
  224. .rpc_proc = &nfs_procedures[NFSPROC_CREATE],
  225. .rpc_argp = &arg,
  226. .rpc_resp = &res,
  227. };
  228. int status, mode;
  229. dprintk("NFS call mknod %s\n", dentry->d_name.name);
  230. mode = sattr->ia_mode;
  231. if (S_ISFIFO(mode)) {
  232. sattr->ia_mode = (mode & ~S_IFMT) | S_IFCHR;
  233. sattr->ia_valid &= ~ATTR_SIZE;
  234. } else if (S_ISCHR(mode) || S_ISBLK(mode)) {
  235. sattr->ia_valid |= ATTR_SIZE;
  236. sattr->ia_size = new_encode_dev(rdev);/* get out your barf bag */
  237. }
  238. nfs_fattr_init(&fattr);
  239. status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
  240. nfs_mark_for_revalidate(dir);
  241. if (status == -EINVAL && S_ISFIFO(mode)) {
  242. sattr->ia_mode = mode;
  243. nfs_fattr_init(&fattr);
  244. status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
  245. }
  246. if (status == 0)
  247. status = nfs_instantiate(dentry, &fhandle, &fattr);
  248. dprintk("NFS reply mknod: %d\n", status);
  249. return status;
  250. }
  251. static int
  252. nfs_proc_remove(struct inode *dir, struct qstr *name)
  253. {
  254. struct nfs_removeargs arg = {
  255. .fh = NFS_FH(dir),
  256. .name.len = name->len,
  257. .name.name = name->name,
  258. };
  259. struct rpc_message msg = {
  260. .rpc_proc = &nfs_procedures[NFSPROC_REMOVE],
  261. .rpc_argp = &arg,
  262. };
  263. int status;
  264. dprintk("NFS call remove %s\n", name->name);
  265. status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
  266. nfs_mark_for_revalidate(dir);
  267. dprintk("NFS reply remove: %d\n", status);
  268. return status;
  269. }
  270. static void
  271. nfs_proc_unlink_setup(struct rpc_message *msg, struct inode *dir)
  272. {
  273. msg->rpc_proc = &nfs_procedures[NFSPROC_REMOVE];
  274. }
  275. static int nfs_proc_unlink_done(struct rpc_task *task, struct inode *dir)
  276. {
  277. nfs_mark_for_revalidate(dir);
  278. return 1;
  279. }
  280. static int
  281. nfs_proc_rename(struct inode *old_dir, struct qstr *old_name,
  282. struct inode *new_dir, struct qstr *new_name)
  283. {
  284. struct nfs_renameargs arg = {
  285. .fromfh = NFS_FH(old_dir),
  286. .fromname = old_name->name,
  287. .fromlen = old_name->len,
  288. .tofh = NFS_FH(new_dir),
  289. .toname = new_name->name,
  290. .tolen = new_name->len
  291. };
  292. struct rpc_message msg = {
  293. .rpc_proc = &nfs_procedures[NFSPROC_RENAME],
  294. .rpc_argp = &arg,
  295. };
  296. int status;
  297. dprintk("NFS call rename %s -> %s\n", old_name->name, new_name->name);
  298. status = rpc_call_sync(NFS_CLIENT(old_dir), &msg, 0);
  299. nfs_mark_for_revalidate(old_dir);
  300. nfs_mark_for_revalidate(new_dir);
  301. dprintk("NFS reply rename: %d\n", status);
  302. return status;
  303. }
  304. static int
  305. nfs_proc_link(struct inode *inode, struct inode *dir, struct qstr *name)
  306. {
  307. struct nfs_linkargs arg = {
  308. .fromfh = NFS_FH(inode),
  309. .tofh = NFS_FH(dir),
  310. .toname = name->name,
  311. .tolen = name->len
  312. };
  313. struct rpc_message msg = {
  314. .rpc_proc = &nfs_procedures[NFSPROC_LINK],
  315. .rpc_argp = &arg,
  316. };
  317. int status;
  318. dprintk("NFS call link %s\n", name->name);
  319. status = rpc_call_sync(NFS_CLIENT(inode), &msg, 0);
  320. nfs_mark_for_revalidate(inode);
  321. nfs_mark_for_revalidate(dir);
  322. dprintk("NFS reply link: %d\n", status);
  323. return status;
  324. }
  325. static int
  326. nfs_proc_symlink(struct inode *dir, struct dentry *dentry, struct page *page,
  327. unsigned int len, struct iattr *sattr)
  328. {
  329. struct nfs_fh fhandle;
  330. struct nfs_fattr fattr;
  331. struct nfs_symlinkargs arg = {
  332. .fromfh = NFS_FH(dir),
  333. .fromname = dentry->d_name.name,
  334. .fromlen = dentry->d_name.len,
  335. .pages = &page,
  336. .pathlen = len,
  337. .sattr = sattr
  338. };
  339. struct rpc_message msg = {
  340. .rpc_proc = &nfs_procedures[NFSPROC_SYMLINK],
  341. .rpc_argp = &arg,
  342. };
  343. int status;
  344. if (len > NFS2_MAXPATHLEN)
  345. return -ENAMETOOLONG;
  346. dprintk("NFS call symlink %s\n", dentry->d_name.name);
  347. status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
  348. nfs_mark_for_revalidate(dir);
  349. /*
  350. * V2 SYMLINK requests don't return any attributes. Setting the
  351. * filehandle size to zero indicates to nfs_instantiate that it
  352. * should fill in the data with a LOOKUP call on the wire.
  353. */
  354. if (status == 0) {
  355. nfs_fattr_init(&fattr);
  356. fhandle.size = 0;
  357. status = nfs_instantiate(dentry, &fhandle, &fattr);
  358. }
  359. dprintk("NFS reply symlink: %d\n", status);
  360. return status;
  361. }
  362. static int
  363. nfs_proc_mkdir(struct inode *dir, struct dentry *dentry, struct iattr *sattr)
  364. {
  365. struct nfs_fh fhandle;
  366. struct nfs_fattr fattr;
  367. struct nfs_createargs arg = {
  368. .fh = NFS_FH(dir),
  369. .name = dentry->d_name.name,
  370. .len = dentry->d_name.len,
  371. .sattr = sattr
  372. };
  373. struct nfs_diropok res = {
  374. .fh = &fhandle,
  375. .fattr = &fattr
  376. };
  377. struct rpc_message msg = {
  378. .rpc_proc = &nfs_procedures[NFSPROC_MKDIR],
  379. .rpc_argp = &arg,
  380. .rpc_resp = &res,
  381. };
  382. int status;
  383. dprintk("NFS call mkdir %s\n", dentry->d_name.name);
  384. nfs_fattr_init(&fattr);
  385. status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
  386. nfs_mark_for_revalidate(dir);
  387. if (status == 0)
  388. status = nfs_instantiate(dentry, &fhandle, &fattr);
  389. dprintk("NFS reply mkdir: %d\n", status);
  390. return status;
  391. }
  392. static int
  393. nfs_proc_rmdir(struct inode *dir, struct qstr *name)
  394. {
  395. struct nfs_diropargs arg = {
  396. .fh = NFS_FH(dir),
  397. .name = name->name,
  398. .len = name->len
  399. };
  400. struct rpc_message msg = {
  401. .rpc_proc = &nfs_procedures[NFSPROC_RMDIR],
  402. .rpc_argp = &arg,
  403. };
  404. int status;
  405. dprintk("NFS call rmdir %s\n", name->name);
  406. status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
  407. nfs_mark_for_revalidate(dir);
  408. dprintk("NFS reply rmdir: %d\n", status);
  409. return status;
  410. }
  411. /*
  412. * The READDIR implementation is somewhat hackish - we pass a temporary
  413. * buffer to the encode function, which installs it in the receive
  414. * the receive iovec. The decode function just parses the reply to make
  415. * sure it is syntactically correct; the entries itself are decoded
  416. * from nfs_readdir by calling the decode_entry function directly.
  417. */
  418. static int
  419. nfs_proc_readdir(struct dentry *dentry, struct rpc_cred *cred,
  420. u64 cookie, struct page *page, unsigned int count, int plus)
  421. {
  422. struct inode *dir = dentry->d_inode;
  423. struct nfs_readdirargs arg = {
  424. .fh = NFS_FH(dir),
  425. .cookie = cookie,
  426. .count = count,
  427. .pages = &page,
  428. };
  429. struct rpc_message msg = {
  430. .rpc_proc = &nfs_procedures[NFSPROC_READDIR],
  431. .rpc_argp = &arg,
  432. .rpc_cred = cred,
  433. };
  434. int status;
  435. dprintk("NFS call readdir %d\n", (unsigned int)cookie);
  436. status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
  437. nfs_invalidate_atime(dir);
  438. dprintk("NFS reply readdir: %d\n", status);
  439. return status;
  440. }
  441. static int
  442. nfs_proc_statfs(struct nfs_server *server, struct nfs_fh *fhandle,
  443. struct nfs_fsstat *stat)
  444. {
  445. struct nfs2_fsstat fsinfo;
  446. struct rpc_message msg = {
  447. .rpc_proc = &nfs_procedures[NFSPROC_STATFS],
  448. .rpc_argp = fhandle,
  449. .rpc_resp = &fsinfo,
  450. };
  451. int status;
  452. dprintk("NFS call statfs\n");
  453. nfs_fattr_init(stat->fattr);
  454. status = rpc_call_sync(server->client, &msg, 0);
  455. dprintk("NFS reply statfs: %d\n", status);
  456. if (status)
  457. goto out;
  458. stat->tbytes = (u64)fsinfo.blocks * fsinfo.bsize;
  459. stat->fbytes = (u64)fsinfo.bfree * fsinfo.bsize;
  460. stat->abytes = (u64)fsinfo.bavail * fsinfo.bsize;
  461. stat->tfiles = 0;
  462. stat->ffiles = 0;
  463. stat->afiles = 0;
  464. out:
  465. return status;
  466. }
  467. static int
  468. nfs_proc_fsinfo(struct nfs_server *server, struct nfs_fh *fhandle,
  469. struct nfs_fsinfo *info)
  470. {
  471. struct nfs2_fsstat fsinfo;
  472. struct rpc_message msg = {
  473. .rpc_proc = &nfs_procedures[NFSPROC_STATFS],
  474. .rpc_argp = fhandle,
  475. .rpc_resp = &fsinfo,
  476. };
  477. int status;
  478. dprintk("NFS call fsinfo\n");
  479. nfs_fattr_init(info->fattr);
  480. status = rpc_call_sync(server->client, &msg, 0);
  481. dprintk("NFS reply fsinfo: %d\n", status);
  482. if (status)
  483. goto out;
  484. info->rtmax = NFS_MAXDATA;
  485. info->rtpref = fsinfo.tsize;
  486. info->rtmult = fsinfo.bsize;
  487. info->wtmax = NFS_MAXDATA;
  488. info->wtpref = fsinfo.tsize;
  489. info->wtmult = fsinfo.bsize;
  490. info->dtpref = fsinfo.tsize;
  491. info->maxfilesize = 0x7FFFFFFF;
  492. info->lease_time = 0;
  493. out:
  494. return status;
  495. }
  496. static int
  497. nfs_proc_pathconf(struct nfs_server *server, struct nfs_fh *fhandle,
  498. struct nfs_pathconf *info)
  499. {
  500. info->max_link = 0;
  501. info->max_namelen = NFS2_MAXNAMLEN;
  502. return 0;
  503. }
  504. static int nfs_read_done(struct rpc_task *task, struct nfs_read_data *data)
  505. {
  506. nfs_invalidate_atime(data->inode);
  507. if (task->tk_status >= 0) {
  508. nfs_refresh_inode(data->inode, data->res.fattr);
  509. /* Emulate the eof flag, which isn't normally needed in NFSv2
  510. * as it is guaranteed to always return the file attributes
  511. */
  512. if (data->args.offset + data->args.count >= data->res.fattr->size)
  513. data->res.eof = 1;
  514. }
  515. return 0;
  516. }
  517. static void nfs_proc_read_setup(struct nfs_read_data *data)
  518. {
  519. struct rpc_message msg = {
  520. .rpc_proc = &nfs_procedures[NFSPROC_READ],
  521. .rpc_argp = &data->args,
  522. .rpc_resp = &data->res,
  523. .rpc_cred = data->cred,
  524. };
  525. rpc_call_setup(&data->task, &msg, 0);
  526. }
  527. static int nfs_write_done(struct rpc_task *task, struct nfs_write_data *data)
  528. {
  529. if (task->tk_status >= 0)
  530. nfs_post_op_update_inode_force_wcc(data->inode, data->res.fattr);
  531. return 0;
  532. }
  533. static void nfs_proc_write_setup(struct nfs_write_data *data, int how)
  534. {
  535. struct rpc_message msg = {
  536. .rpc_proc = &nfs_procedures[NFSPROC_WRITE],
  537. .rpc_argp = &data->args,
  538. .rpc_resp = &data->res,
  539. .rpc_cred = data->cred,
  540. };
  541. /* Note: NFSv2 ignores @stable and always uses NFS_FILE_SYNC */
  542. data->args.stable = NFS_FILE_SYNC;
  543. /* Finalize the task. */
  544. rpc_call_setup(&data->task, &msg, 0);
  545. }
  546. static void
  547. nfs_proc_commit_setup(struct nfs_write_data *data, int how)
  548. {
  549. BUG();
  550. }
  551. static int
  552. nfs_proc_lock(struct file *filp, int cmd, struct file_lock *fl)
  553. {
  554. return nlmclnt_proc(filp->f_path.dentry->d_inode, cmd, fl);
  555. }
  556. const struct nfs_rpc_ops nfs_v2_clientops = {
  557. .version = 2, /* protocol version */
  558. .dentry_ops = &nfs_dentry_operations,
  559. .dir_inode_ops = &nfs_dir_inode_operations,
  560. .file_inode_ops = &nfs_file_inode_operations,
  561. .getroot = nfs_proc_get_root,
  562. .getattr = nfs_proc_getattr,
  563. .setattr = nfs_proc_setattr,
  564. .lookup = nfs_proc_lookup,
  565. .access = NULL, /* access */
  566. .readlink = nfs_proc_readlink,
  567. .create = nfs_proc_create,
  568. .remove = nfs_proc_remove,
  569. .unlink_setup = nfs_proc_unlink_setup,
  570. .unlink_done = nfs_proc_unlink_done,
  571. .rename = nfs_proc_rename,
  572. .link = nfs_proc_link,
  573. .symlink = nfs_proc_symlink,
  574. .mkdir = nfs_proc_mkdir,
  575. .rmdir = nfs_proc_rmdir,
  576. .readdir = nfs_proc_readdir,
  577. .mknod = nfs_proc_mknod,
  578. .statfs = nfs_proc_statfs,
  579. .fsinfo = nfs_proc_fsinfo,
  580. .pathconf = nfs_proc_pathconf,
  581. .decode_dirent = nfs_decode_dirent,
  582. .read_setup = nfs_proc_read_setup,
  583. .read_done = nfs_read_done,
  584. .write_setup = nfs_proc_write_setup,
  585. .write_done = nfs_write_done,
  586. .commit_setup = nfs_proc_commit_setup,
  587. .file_open = nfs_open,
  588. .file_release = nfs_release,
  589. .lock = nfs_proc_lock,
  590. };