patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / fs / nfs / proc.c
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
30 #include <linux/types.h>
31 #include <linux/param.h>
32 #include <linux/slab.h>
33 #include <linux/time.h>
34 #include <linux/mm.h>
35 #include <linux/utsname.h>
36 #include <linux/errno.h>
37 #include <linux/string.h>
38 #include <linux/in.h>
39 #include <linux/pagemap.h>
40 #include <linux/sunrpc/clnt.h>
41 #include <linux/nfs.h>
42 #include <linux/nfs2.h>
43 #include <linux/nfs_fs.h>
44 #include <linux/nfs_page.h>
45 #include <linux/lockd/bind.h>
46 #include <linux/smp_lock.h>
47
48 #define NFSDBG_FACILITY         NFSDBG_PROC
49
50 extern struct rpc_procinfo nfs_procedures[];
51
52 static struct rpc_cred *
53 nfs_cred(struct inode *inode, struct file *filp)
54 {
55         struct rpc_cred *cred = NULL;
56
57         if (filp)
58                 cred = (struct rpc_cred *)filp->private_data;
59         if (!cred)
60                 cred = NFS_I(inode)->mm_cred;
61         return cred;
62 }
63
64 /*
65  * Bare-bones access to getattr: this is for nfs_read_super.
66  */
67 static int
68 nfs_proc_get_root(struct nfs_server *server, struct nfs_fh *fhandle,
69                   struct nfs_fsinfo *info)
70 {
71         struct nfs_fattr *fattr = info->fattr;
72         struct nfs2_fsstat fsinfo;
73         int status;
74
75         dprintk("%s: call getattr\n", __FUNCTION__);
76         fattr->valid = 0;
77         status = rpc_call(server->client_sys, NFSPROC_GETATTR, fhandle, fattr, 0);
78         dprintk("%s: reply getattr %d\n", __FUNCTION__, status);
79         if (status)
80                 return status;
81         dprintk("%s: call statfs\n", __FUNCTION__);
82         status = rpc_call(server->client_sys, NFSPROC_STATFS, fhandle, &fsinfo, 0);
83         dprintk("%s: reply statfs %d\n", __FUNCTION__, status);
84         if (status)
85                 return status;
86         info->rtmax  = NFS_MAXDATA;
87         info->rtpref = fsinfo.tsize;
88         info->rtmult = fsinfo.bsize;
89         info->wtmax  = NFS_MAXDATA;
90         info->wtpref = fsinfo.tsize;
91         info->wtmult = fsinfo.bsize;
92         info->dtpref = fsinfo.tsize;
93         info->maxfilesize = 0x7FFFFFFF;
94         info->lease_time = 0;
95         return 0;
96 }
97
98 /*
99  * One function for each procedure in the NFS protocol.
100  */
101 static int
102 nfs_proc_getattr(struct inode *inode, struct nfs_fattr *fattr)
103 {
104         int     status;
105
106         dprintk("NFS call  getattr\n");
107         fattr->valid = 0;
108         status = rpc_call(NFS_CLIENT(inode), NFSPROC_GETATTR,
109                                 NFS_FH(inode), fattr, 0);
110         dprintk("NFS reply getattr\n");
111         return status;
112 }
113
114 static int
115 nfs_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr,
116                  struct iattr *sattr)
117 {
118         struct inode *inode = dentry->d_inode;
119         struct nfs_sattrargs    arg = { 
120                 .fh     = NFS_FH(inode),
121                 .sattr  = sattr
122         };
123         int     status;
124
125         dprintk("NFS call  setattr\n");
126         fattr->valid = 0;
127         status = rpc_call(NFS_CLIENT(inode), NFSPROC_SETATTR, &arg, fattr, 0);
128         dprintk("NFS reply setattr\n");
129         return status;
130 }
131
132 static int
133 nfs_proc_lookup(struct inode *dir, struct qstr *name,
134                 struct nfs_fh *fhandle, struct nfs_fattr *fattr)
135 {
136         struct nfs_diropargs    arg = {
137                 .fh             = NFS_FH(dir),
138                 .name           = name->name,
139                 .len            = name->len
140         };
141         struct nfs_diropok      res = {
142                 .fh             = fhandle,
143                 .fattr          = fattr
144         };
145         int                     status;
146
147         dprintk("NFS call  lookup %s\n", name->name);
148         fattr->valid = 0;
149         status = rpc_call(NFS_CLIENT(dir), NFSPROC_LOOKUP, &arg, &res, 0);
150         dprintk("NFS reply lookup: %d\n", status);
151         return status;
152 }
153
154 static int
155 nfs_proc_readlink(struct inode *inode, struct page *page)
156 {
157         struct nfs_readlinkargs args = {
158                 .fh             = NFS_FH(inode),
159                 .count          = PAGE_CACHE_SIZE,
160                 .pages          = &page
161         };
162         int                     status;
163
164         dprintk("NFS call  readlink\n");
165         status = rpc_call(NFS_CLIENT(inode), NFSPROC_READLINK, &args, NULL, 0);
166         dprintk("NFS reply readlink: %d\n", status);
167         return status;
168 }
169
170 static int
171 nfs_proc_read(struct nfs_read_data *rdata, struct file *filp)
172 {
173         int                     flags = rdata->flags;
174         struct inode *          inode = rdata->inode;
175         struct nfs_fattr *      fattr = rdata->res.fattr;
176         struct rpc_message      msg = {
177                 .rpc_proc       = &nfs_procedures[NFSPROC_READ],
178                 .rpc_argp       = &rdata->args,
179                 .rpc_resp       = &rdata->res,
180         };
181         int                     status;
182
183         dprintk("NFS call  read %d @ %Ld\n", rdata->args.count,
184                         (long long) rdata->args.offset);
185         fattr->valid = 0;
186         msg.rpc_cred = nfs_cred(inode, filp);
187         status = rpc_call_sync(NFS_CLIENT(inode), &msg, flags);
188
189         if (status >= 0) {
190                 nfs_refresh_inode(inode, fattr);
191                 /* Emulate the eof flag, which isn't normally needed in NFSv2
192                  * as it is guaranteed to always return the file attributes
193                  */
194                 if (rdata->args.offset + rdata->args.count >= fattr->size)
195                         rdata->res.eof = 1;
196         }
197         dprintk("NFS reply read: %d\n", status);
198         return status;
199 }
200
201 static int
202 nfs_proc_write(struct nfs_write_data *wdata, struct file *filp)
203 {
204         int                     flags = wdata->flags;
205         struct inode *          inode = wdata->inode;
206         struct nfs_fattr *      fattr = wdata->res.fattr;
207         struct rpc_message      msg = {
208                 .rpc_proc       = &nfs_procedures[NFSPROC_WRITE],
209                 .rpc_argp       = &wdata->args,
210                 .rpc_resp       = &wdata->res,
211         };
212         int                     status;
213
214         dprintk("NFS call  write %d @ %Ld\n", wdata->args.count,
215                         (long long) wdata->args.offset);
216         fattr->valid = 0;
217         msg.rpc_cred = nfs_cred(inode, filp);
218         status = rpc_call_sync(NFS_CLIENT(inode), &msg, flags);
219         if (status >= 0) {
220                 nfs_refresh_inode(inode, fattr);
221                 wdata->res.count = wdata->args.count;
222                 wdata->verf.committed = NFS_FILE_SYNC;
223         }
224         dprintk("NFS reply write: %d\n", status);
225         return status < 0? status : wdata->res.count;
226 }
227
228 static struct inode *
229 nfs_proc_create(struct inode *dir, struct qstr *name, struct iattr *sattr,
230                 int flags)
231 {
232         struct nfs_fh           fhandle;
233         struct nfs_fattr        fattr;
234         struct nfs_createargs   arg = {
235                 .fh             = NFS_FH(dir),
236                 .name           = name->name,
237                 .len            = name->len,
238                 .sattr          = sattr
239         };
240         struct nfs_diropok      res = {
241                 .fh             = &fhandle,
242                 .fattr          = &fattr
243         };
244         int                     status;
245
246         fattr.valid = 0;
247         memset(&fattr, 0, sizeof(struct nfs_fattr));
248
249
250         dprintk("NFS call  create %s\n", name->name);
251         status = rpc_call(NFS_CLIENT(dir), NFSPROC_CREATE, &arg, &res, 0);
252         dprintk("NFS reply create: %d\n", status);
253         if (status == 0) {
254                 struct inode *inode;
255                 inode = nfs_fhget(dir->i_sb, &fhandle, &fattr);
256                 if (inode)
257                         return inode;
258                 status = -ENOMEM;
259         }
260         return ERR_PTR(status);
261 }
262
263 /*
264  * In NFSv2, mknod is grafted onto the create call.
265  */
266 static int
267 nfs_proc_mknod(struct inode *dir, struct qstr *name, struct iattr *sattr,
268                dev_t rdev, struct nfs_fh *fhandle, struct nfs_fattr *fattr)
269 {
270         struct nfs_createargs   arg = {
271                 .fh             = NFS_FH(dir),
272                 .name           = name->name,
273                 .len            = name->len,
274                 .sattr          = sattr
275         };
276         struct nfs_diropok      res = {
277                 .fh             = fhandle,
278                 .fattr          = fattr
279         };
280         int                     status, mode;
281
282         dprintk("NFS call  mknod %s\n", name->name);
283
284         mode = sattr->ia_mode;
285         if (S_ISFIFO(mode)) {
286                 sattr->ia_mode = (mode & ~S_IFMT) | S_IFCHR;
287                 sattr->ia_valid &= ~ATTR_SIZE;
288         } else if (S_ISCHR(mode) || S_ISBLK(mode)) {
289                 sattr->ia_valid |= ATTR_SIZE;
290                 sattr->ia_size = new_encode_dev(rdev);/* get out your barf bag */
291         }
292
293         fattr->valid = 0;
294         status = rpc_call(NFS_CLIENT(dir), NFSPROC_CREATE, &arg, &res, 0);
295
296         if (status == -EINVAL && S_ISFIFO(mode)) {
297                 sattr->ia_mode = mode;
298                 fattr->valid = 0;
299                 status = rpc_call(NFS_CLIENT(dir), NFSPROC_CREATE, &arg, &res, 0);
300         }
301         dprintk("NFS reply mknod: %d\n", status);
302         return status;
303 }
304   
305 static int
306 nfs_proc_remove(struct inode *dir, struct qstr *name)
307 {
308         struct nfs_diropargs    arg = {
309                 .fh             = NFS_FH(dir),
310                 .name           = name->name,
311                 .len            = name->len
312         };
313         struct rpc_message      msg = { 
314                 .rpc_proc       = &nfs_procedures[NFSPROC_REMOVE],
315                 .rpc_argp       = &arg,
316                 .rpc_resp       = NULL,
317                 .rpc_cred       = NULL
318         };
319         int                     status;
320
321         dprintk("NFS call  remove %s\n", name->name);
322         status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
323
324         dprintk("NFS reply remove: %d\n", status);
325         return status;
326 }
327
328 static int
329 nfs_proc_unlink_setup(struct rpc_message *msg, struct dentry *dir, struct qstr *name)
330 {
331         struct nfs_diropargs    *arg;
332
333         arg = (struct nfs_diropargs *)kmalloc(sizeof(*arg), GFP_KERNEL);
334         if (!arg)
335                 return -ENOMEM;
336         arg->fh = NFS_FH(dir->d_inode);
337         arg->name = name->name;
338         arg->len = name->len;
339         msg->rpc_proc = &nfs_procedures[NFSPROC_REMOVE];
340         msg->rpc_argp = arg;
341         return 0;
342 }
343
344 static int
345 nfs_proc_unlink_done(struct dentry *dir, struct rpc_task *task)
346 {
347         struct rpc_message *msg = &task->tk_msg;
348         
349         if (msg->rpc_argp)
350                 kfree(msg->rpc_argp);
351         return 0;
352 }
353
354 static int
355 nfs_proc_rename(struct inode *old_dir, struct qstr *old_name,
356                 struct inode *new_dir, struct qstr *new_name)
357 {
358         struct nfs_renameargs   arg = {
359                 .fromfh         = NFS_FH(old_dir),
360                 .fromname       = old_name->name,
361                 .fromlen        = old_name->len,
362                 .tofh           = NFS_FH(new_dir),
363                 .toname         = new_name->name,
364                 .tolen          = new_name->len
365         };
366         int                     status;
367
368         dprintk("NFS call  rename %s -> %s\n", old_name->name, new_name->name);
369         status = rpc_call(NFS_CLIENT(old_dir), NFSPROC_RENAME, &arg, NULL, 0);
370         dprintk("NFS reply rename: %d\n", status);
371         return status;
372 }
373
374 static int
375 nfs_proc_link(struct inode *inode, struct inode *dir, struct qstr *name)
376 {
377         struct nfs_linkargs     arg = {
378                 .fromfh         = NFS_FH(inode),
379                 .tofh           = NFS_FH(dir),
380                 .toname         = name->name,
381                 .tolen          = name->len
382         };
383         int                     status;
384
385         dprintk("NFS call  link %s\n", name->name);
386         status = rpc_call(NFS_CLIENT(inode), NFSPROC_LINK, &arg, NULL, 0);
387         dprintk("NFS reply link: %d\n", status);
388         return status;
389 }
390
391 static int
392 nfs_proc_symlink(struct inode *dir, struct qstr *name, struct qstr *path,
393                  struct iattr *sattr, struct nfs_fh *fhandle,
394                  struct nfs_fattr *fattr)
395 {
396         struct nfs_symlinkargs  arg = {
397                 .fromfh         = NFS_FH(dir),
398                 .fromname       = name->name,
399                 .fromlen        = name->len,
400                 .topath         = path->name,
401                 .tolen          = path->len,
402                 .sattr          = sattr
403         };
404         int                     status;
405
406         dprintk("NFS call  symlink %s -> %s\n", name->name, path->name);
407         fattr->valid = 0;
408         status = rpc_call(NFS_CLIENT(dir), NFSPROC_SYMLINK, &arg, NULL, 0);
409         dprintk("NFS reply symlink: %d\n", status);
410         return status;
411 }
412
413 static int
414 nfs_proc_mkdir(struct inode *dir, struct qstr *name, struct iattr *sattr,
415                struct nfs_fh *fhandle, struct nfs_fattr *fattr)
416 {
417         struct nfs_createargs   arg = {
418                 .fh             = NFS_FH(dir),
419                 .name           = name->name,
420                 .len            = name->len,
421                 .sattr          = sattr
422         };
423         struct nfs_diropok      res = {
424                 .fh             = fhandle,
425                 .fattr          = fattr
426         };
427         int                     status;
428
429         dprintk("NFS call  mkdir %s\n", name->name);
430         fattr->valid = 0;
431         status = rpc_call(NFS_CLIENT(dir), NFSPROC_MKDIR, &arg, &res, 0);
432         dprintk("NFS reply mkdir: %d\n", status);
433         return status;
434 }
435
436 static int
437 nfs_proc_rmdir(struct inode *dir, struct qstr *name)
438 {
439         struct nfs_diropargs    arg = {
440                 .fh             = NFS_FH(dir),
441                 .name           = name->name,
442                 .len            = name->len
443         };
444         int                     status;
445
446         dprintk("NFS call  rmdir %s\n", name->name);
447         status = rpc_call(NFS_CLIENT(dir), NFSPROC_RMDIR, &arg, NULL, 0);
448         dprintk("NFS reply rmdir: %d\n", status);
449         return status;
450 }
451
452 /*
453  * The READDIR implementation is somewhat hackish - we pass a temporary
454  * buffer to the encode function, which installs it in the receive
455  * the receive iovec. The decode function just parses the reply to make
456  * sure it is syntactically correct; the entries itself are decoded
457  * from nfs_readdir by calling the decode_entry function directly.
458  */
459 static int
460 nfs_proc_readdir(struct dentry *dentry, struct rpc_cred *cred,
461                  u64 cookie, struct page *page, unsigned int count, int plus)
462 {
463         struct inode            *dir = dentry->d_inode;
464         struct nfs_readdirargs  arg = {
465                 .fh             = NFS_FH(dir),
466                 .cookie         = cookie,
467                 .count          = count,
468                 .pages          = &page
469         };
470         struct rpc_message      msg = {
471                 .rpc_proc       = &nfs_procedures[NFSPROC_READDIR],
472                 .rpc_argp       = &arg,
473                 .rpc_resp       = NULL,
474                 .rpc_cred       = cred
475         };
476         int                     status;
477
478         lock_kernel();
479
480         dprintk("NFS call  readdir %d\n", (unsigned int)cookie);
481         status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
482
483         dprintk("NFS reply readdir: %d\n", status);
484         unlock_kernel();
485         return status;
486 }
487
488 static int
489 nfs_proc_statfs(struct nfs_server *server, struct nfs_fh *fhandle,
490                         struct nfs_fsstat *stat)
491 {
492         struct nfs2_fsstat fsinfo;
493         int     status;
494
495         dprintk("NFS call  statfs\n");
496         stat->fattr->valid = 0;
497         status = rpc_call(server->client, NFSPROC_STATFS, fhandle, &fsinfo, 0);
498         dprintk("NFS reply statfs: %d\n", status);
499         if (status)
500                 goto out;
501         stat->tbytes = (u64)fsinfo.blocks * fsinfo.bsize;
502         stat->fbytes = (u64)fsinfo.bfree  * fsinfo.bsize;
503         stat->abytes = (u64)fsinfo.bavail * fsinfo.bsize;
504         stat->tfiles = 0;
505         stat->ffiles = 0;
506         stat->afiles = 0;
507 out:
508         return status;
509 }
510
511 static int
512 nfs_proc_fsinfo(struct nfs_server *server, struct nfs_fh *fhandle,
513                         struct nfs_fsinfo *info)
514 {
515         struct nfs2_fsstat fsinfo;
516         int     status;
517
518         dprintk("NFS call  fsinfo\n");
519         info->fattr->valid = 0;
520         status = rpc_call(server->client, NFSPROC_STATFS, fhandle, &fsinfo, 0);
521         dprintk("NFS reply fsinfo: %d\n", status);
522         if (status)
523                 goto out;
524         info->rtmax  = NFS_MAXDATA;
525         info->rtpref = fsinfo.tsize;
526         info->rtmult = fsinfo.bsize;
527         info->wtmax  = NFS_MAXDATA;
528         info->wtpref = fsinfo.tsize;
529         info->wtmult = fsinfo.bsize;
530         info->dtpref = fsinfo.tsize;
531         info->maxfilesize = 0x7FFFFFFF;
532         info->lease_time = 0;
533 out:
534         return status;
535 }
536
537 static int
538 nfs_proc_pathconf(struct nfs_server *server, struct nfs_fh *fhandle,
539                   struct nfs_pathconf *info)
540 {
541         info->max_link = 0;
542         info->max_namelen = NFS2_MAXNAMLEN;
543         return 0;
544 }
545
546 extern u32 * nfs_decode_dirent(u32 *, struct nfs_entry *, int);
547
548 static void
549 nfs_read_done(struct rpc_task *task)
550 {
551         struct nfs_read_data *data = (struct nfs_read_data *) task->tk_calldata;
552
553         if (task->tk_status >= 0) {
554                 nfs_refresh_inode(data->inode, data->res.fattr);
555                 /* Emulate the eof flag, which isn't normally needed in NFSv2
556                  * as it is guaranteed to always return the file attributes
557                  */
558                 if (data->args.offset + data->args.count >= data->res.fattr->size)
559                         data->res.eof = 1;
560         }
561         nfs_readpage_result(task);
562 }
563
564 static void
565 nfs_proc_read_setup(struct nfs_read_data *data)
566 {
567         struct rpc_task         *task = &data->task;
568         struct inode            *inode = data->inode;
569         int                     flags;
570         struct rpc_message      msg = {
571                 .rpc_proc       = &nfs_procedures[NFSPROC_READ],
572                 .rpc_argp       = &data->args,
573                 .rpc_resp       = &data->res,
574                 .rpc_cred       = data->cred,
575         };
576
577         /* N.B. Do we need to test? Never called for swapfile inode */
578         flags = RPC_TASK_ASYNC | (IS_SWAPFILE(inode)? NFS_RPC_SWAPFLAGS : 0);
579
580         /* Finalize the task. */
581         rpc_init_task(task, NFS_CLIENT(inode), nfs_read_done, flags);
582         rpc_call_setup(task, &msg, 0);
583 }
584
585 static void
586 nfs_write_done(struct rpc_task *task)
587 {
588         struct nfs_write_data *data = (struct nfs_write_data *) task->tk_calldata;
589
590         if (task->tk_status >= 0)
591                 nfs_refresh_inode(data->inode, data->res.fattr);
592         nfs_writeback_done(task);
593 }
594
595 static void
596 nfs_proc_write_setup(struct nfs_write_data *data, int how)
597 {
598         struct rpc_task         *task = &data->task;
599         struct inode            *inode = data->inode;
600         int                     flags;
601         struct rpc_message      msg = {
602                 .rpc_proc       = &nfs_procedures[NFSPROC_WRITE],
603                 .rpc_argp       = &data->args,
604                 .rpc_resp       = &data->res,
605                 .rpc_cred       = data->cred,
606         };
607
608         /* Note: NFSv2 ignores @stable and always uses NFS_FILE_SYNC */
609         data->args.stable = NFS_FILE_SYNC;
610
611         /* Set the initial flags for the task.  */
612         flags = (how & FLUSH_SYNC) ? 0 : RPC_TASK_ASYNC;
613
614         /* Finalize the task. */
615         rpc_init_task(task, NFS_CLIENT(inode), nfs_write_done, flags);
616         rpc_call_setup(task, &msg, 0);
617 }
618
619 static void
620 nfs_proc_commit_setup(struct nfs_write_data *data, int how)
621 {
622         BUG();
623 }
624
625 /*
626  * Set up the nfspage struct with the right credentials
627  */
628 static void
629 nfs_request_init(struct nfs_page *req, struct file *filp)
630 {
631         req->wb_cred = get_rpccred(nfs_cred(req->wb_inode, filp));
632 }
633
634 static int
635 nfs_request_compatible(struct nfs_page *req, struct file *filp, struct page *page)
636 {
637         if (req->wb_file != filp)
638                 return 0;
639         if (req->wb_page != page)
640                 return 0;
641         if (req->wb_cred != nfs_file_cred(filp))
642                 return 0;
643         return 1;
644 }
645
646 static int
647 nfs_proc_lock(struct file *filp, int cmd, struct file_lock *fl)
648 {
649         return nlmclnt_proc(filp->f_dentry->d_inode, cmd, fl);
650 }
651
652
653 struct nfs_rpc_ops      nfs_v2_clientops = {
654         .version        = 2,                   /* protocol version */
655         .dentry_ops     = &nfs_dentry_operations,
656         .dir_inode_ops  = &nfs_dir_inode_operations,
657         .getroot        = nfs_proc_get_root,
658         .getattr        = nfs_proc_getattr,
659         .setattr        = nfs_proc_setattr,
660         .lookup         = nfs_proc_lookup,
661         .access         = NULL,                /* access */
662         .readlink       = nfs_proc_readlink,
663         .read           = nfs_proc_read,
664         .write          = nfs_proc_write,
665         .commit         = NULL,                /* commit */
666         .create         = nfs_proc_create,
667         .remove         = nfs_proc_remove,
668         .unlink_setup   = nfs_proc_unlink_setup,
669         .unlink_done    = nfs_proc_unlink_done,
670         .rename         = nfs_proc_rename,
671         .link           = nfs_proc_link,
672         .symlink        = nfs_proc_symlink,
673         .mkdir          = nfs_proc_mkdir,
674         .rmdir          = nfs_proc_rmdir,
675         .readdir        = nfs_proc_readdir,
676         .mknod          = nfs_proc_mknod,
677         .statfs         = nfs_proc_statfs,
678         .fsinfo         = nfs_proc_fsinfo,
679         .pathconf       = nfs_proc_pathconf,
680         .decode_dirent  = nfs_decode_dirent,
681         .read_setup     = nfs_proc_read_setup,
682         .write_setup    = nfs_proc_write_setup,
683         .commit_setup   = nfs_proc_commit_setup,
684         .file_open      = nfs_open,
685         .file_release   = nfs_release,
686         .request_init   = nfs_request_init,
687         .request_compatible = nfs_request_compatible,
688         .lock           = nfs_proc_lock,
689 };