ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.6.tar.bz2
[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         dprintk("NFS call  create %s\n", name->name);
248         status = rpc_call(NFS_CLIENT(dir), NFSPROC_CREATE, &arg, &res, 0);
249         dprintk("NFS reply create: %d\n", status);
250         if (status == 0) {
251                 struct inode *inode;
252                 inode = nfs_fhget(dir->i_sb, &fhandle, &fattr);
253                 if (inode)
254                         return inode;
255                 status = -ENOMEM;
256         }
257         return ERR_PTR(status);
258 }
259
260 /*
261  * In NFSv2, mknod is grafted onto the create call.
262  */
263 static int
264 nfs_proc_mknod(struct inode *dir, struct qstr *name, struct iattr *sattr,
265                dev_t rdev, struct nfs_fh *fhandle, struct nfs_fattr *fattr)
266 {
267         struct nfs_createargs   arg = {
268                 .fh             = NFS_FH(dir),
269                 .name           = name->name,
270                 .len            = name->len,
271                 .sattr          = sattr
272         };
273         struct nfs_diropok      res = {
274                 .fh             = fhandle,
275                 .fattr          = fattr
276         };
277         int                     status, mode;
278
279         dprintk("NFS call  mknod %s\n", name->name);
280
281         mode = sattr->ia_mode;
282         if (S_ISFIFO(mode)) {
283                 sattr->ia_mode = (mode & ~S_IFMT) | S_IFCHR;
284                 sattr->ia_valid &= ~ATTR_SIZE;
285         } else if (S_ISCHR(mode) || S_ISBLK(mode)) {
286                 sattr->ia_valid |= ATTR_SIZE;
287                 sattr->ia_size = new_encode_dev(rdev);/* get out your barf bag */
288         }
289
290         fattr->valid = 0;
291         status = rpc_call(NFS_CLIENT(dir), NFSPROC_CREATE, &arg, &res, 0);
292
293         if (status == -EINVAL && S_ISFIFO(mode)) {
294                 sattr->ia_mode = mode;
295                 fattr->valid = 0;
296                 status = rpc_call(NFS_CLIENT(dir), NFSPROC_CREATE, &arg, &res, 0);
297         }
298         dprintk("NFS reply mknod: %d\n", status);
299         return status;
300 }
301   
302 static int
303 nfs_proc_remove(struct inode *dir, struct qstr *name)
304 {
305         struct nfs_diropargs    arg = {
306                 .fh             = NFS_FH(dir),
307                 .name           = name->name,
308                 .len            = name->len
309         };
310         struct rpc_message      msg = { 
311                 .rpc_proc       = &nfs_procedures[NFSPROC_REMOVE],
312                 .rpc_argp       = &arg,
313                 .rpc_resp       = NULL,
314                 .rpc_cred       = NULL
315         };
316         int                     status;
317
318         dprintk("NFS call  remove %s\n", name->name);
319         status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
320
321         dprintk("NFS reply remove: %d\n", status);
322         return status;
323 }
324
325 static int
326 nfs_proc_unlink_setup(struct rpc_message *msg, struct dentry *dir, struct qstr *name)
327 {
328         struct nfs_diropargs    *arg;
329
330         arg = (struct nfs_diropargs *)kmalloc(sizeof(*arg), GFP_KERNEL);
331         if (!arg)
332                 return -ENOMEM;
333         arg->fh = NFS_FH(dir->d_inode);
334         arg->name = name->name;
335         arg->len = name->len;
336         msg->rpc_proc = &nfs_procedures[NFSPROC_REMOVE];
337         msg->rpc_argp = arg;
338         return 0;
339 }
340
341 static int
342 nfs_proc_unlink_done(struct dentry *dir, struct rpc_task *task)
343 {
344         struct rpc_message *msg = &task->tk_msg;
345         
346         if (msg->rpc_argp)
347                 kfree(msg->rpc_argp);
348         return 0;
349 }
350
351 static int
352 nfs_proc_rename(struct inode *old_dir, struct qstr *old_name,
353                 struct inode *new_dir, struct qstr *new_name)
354 {
355         struct nfs_renameargs   arg = {
356                 .fromfh         = NFS_FH(old_dir),
357                 .fromname       = old_name->name,
358                 .fromlen        = old_name->len,
359                 .tofh           = NFS_FH(new_dir),
360                 .toname         = new_name->name,
361                 .tolen          = new_name->len
362         };
363         int                     status;
364
365         dprintk("NFS call  rename %s -> %s\n", old_name->name, new_name->name);
366         status = rpc_call(NFS_CLIENT(old_dir), NFSPROC_RENAME, &arg, NULL, 0);
367         dprintk("NFS reply rename: %d\n", status);
368         return status;
369 }
370
371 static int
372 nfs_proc_link(struct inode *inode, struct inode *dir, struct qstr *name)
373 {
374         struct nfs_linkargs     arg = {
375                 .fromfh         = NFS_FH(inode),
376                 .tofh           = NFS_FH(dir),
377                 .toname         = name->name,
378                 .tolen          = name->len
379         };
380         int                     status;
381
382         dprintk("NFS call  link %s\n", name->name);
383         status = rpc_call(NFS_CLIENT(inode), NFSPROC_LINK, &arg, NULL, 0);
384         dprintk("NFS reply link: %d\n", status);
385         return status;
386 }
387
388 static int
389 nfs_proc_symlink(struct inode *dir, struct qstr *name, struct qstr *path,
390                  struct iattr *sattr, struct nfs_fh *fhandle,
391                  struct nfs_fattr *fattr)
392 {
393         struct nfs_symlinkargs  arg = {
394                 .fromfh         = NFS_FH(dir),
395                 .fromname       = name->name,
396                 .fromlen        = name->len,
397                 .topath         = path->name,
398                 .tolen          = path->len,
399                 .sattr          = sattr
400         };
401         int                     status;
402
403         dprintk("NFS call  symlink %s -> %s\n", name->name, path->name);
404         fattr->valid = 0;
405         status = rpc_call(NFS_CLIENT(dir), NFSPROC_SYMLINK, &arg, NULL, 0);
406         dprintk("NFS reply symlink: %d\n", status);
407         return status;
408 }
409
410 static int
411 nfs_proc_mkdir(struct inode *dir, struct qstr *name, struct iattr *sattr,
412                struct nfs_fh *fhandle, struct nfs_fattr *fattr)
413 {
414         struct nfs_createargs   arg = {
415                 .fh             = NFS_FH(dir),
416                 .name           = name->name,
417                 .len            = name->len,
418                 .sattr          = sattr
419         };
420         struct nfs_diropok      res = {
421                 .fh             = fhandle,
422                 .fattr          = fattr
423         };
424         int                     status;
425
426         dprintk("NFS call  mkdir %s\n", name->name);
427         fattr->valid = 0;
428         status = rpc_call(NFS_CLIENT(dir), NFSPROC_MKDIR, &arg, &res, 0);
429         dprintk("NFS reply mkdir: %d\n", status);
430         return status;
431 }
432
433 static int
434 nfs_proc_rmdir(struct inode *dir, struct qstr *name)
435 {
436         struct nfs_diropargs    arg = {
437                 .fh             = NFS_FH(dir),
438                 .name           = name->name,
439                 .len            = name->len
440         };
441         int                     status;
442
443         dprintk("NFS call  rmdir %s\n", name->name);
444         status = rpc_call(NFS_CLIENT(dir), NFSPROC_RMDIR, &arg, NULL, 0);
445         dprintk("NFS reply rmdir: %d\n", status);
446         return status;
447 }
448
449 /*
450  * The READDIR implementation is somewhat hackish - we pass a temporary
451  * buffer to the encode function, which installs it in the receive
452  * the receive iovec. The decode function just parses the reply to make
453  * sure it is syntactically correct; the entries itself are decoded
454  * from nfs_readdir by calling the decode_entry function directly.
455  */
456 static int
457 nfs_proc_readdir(struct dentry *dentry, struct rpc_cred *cred,
458                  u64 cookie, struct page *page, unsigned int count, int plus)
459 {
460         struct inode            *dir = dentry->d_inode;
461         struct nfs_readdirargs  arg = {
462                 .fh             = NFS_FH(dir),
463                 .cookie         = cookie,
464                 .count          = count,
465                 .pages          = &page
466         };
467         struct rpc_message      msg = {
468                 .rpc_proc       = &nfs_procedures[NFSPROC_READDIR],
469                 .rpc_argp       = &arg,
470                 .rpc_resp       = NULL,
471                 .rpc_cred       = cred
472         };
473         int                     status;
474
475         lock_kernel();
476
477         dprintk("NFS call  readdir %d\n", (unsigned int)cookie);
478         status = rpc_call_sync(NFS_CLIENT(dir), &msg, 0);
479
480         dprintk("NFS reply readdir: %d\n", status);
481         unlock_kernel();
482         return status;
483 }
484
485 static int
486 nfs_proc_statfs(struct nfs_server *server, struct nfs_fh *fhandle,
487                         struct nfs_fsstat *stat)
488 {
489         struct nfs2_fsstat fsinfo;
490         int     status;
491
492         dprintk("NFS call  statfs\n");
493         stat->fattr->valid = 0;
494         status = rpc_call(server->client, NFSPROC_STATFS, fhandle, &fsinfo, 0);
495         dprintk("NFS reply statfs: %d\n", status);
496         if (status)
497                 goto out;
498         stat->tbytes = (u64)fsinfo.blocks * fsinfo.bsize;
499         stat->fbytes = (u64)fsinfo.bfree  * fsinfo.bsize;
500         stat->abytes = (u64)fsinfo.bavail * fsinfo.bsize;
501         stat->tfiles = 0;
502         stat->ffiles = 0;
503         stat->afiles = 0;
504 out:
505         return status;
506 }
507
508 static int
509 nfs_proc_fsinfo(struct nfs_server *server, struct nfs_fh *fhandle,
510                         struct nfs_fsinfo *info)
511 {
512         struct nfs2_fsstat fsinfo;
513         int     status;
514
515         dprintk("NFS call  fsinfo\n");
516         info->fattr->valid = 0;
517         status = rpc_call(server->client, NFSPROC_STATFS, fhandle, &fsinfo, 0);
518         dprintk("NFS reply fsinfo: %d\n", status);
519         if (status)
520                 goto out;
521         info->rtmax  = NFS_MAXDATA;
522         info->rtpref = fsinfo.tsize;
523         info->rtmult = fsinfo.bsize;
524         info->wtmax  = NFS_MAXDATA;
525         info->wtpref = fsinfo.tsize;
526         info->wtmult = fsinfo.bsize;
527         info->dtpref = fsinfo.tsize;
528         info->maxfilesize = 0x7FFFFFFF;
529         info->lease_time = 0;
530 out:
531         return status;
532 }
533
534 static int
535 nfs_proc_pathconf(struct nfs_server *server, struct nfs_fh *fhandle,
536                   struct nfs_pathconf *info)
537 {
538         info->max_link = 0;
539         info->max_namelen = NFS2_MAXNAMLEN;
540         return 0;
541 }
542
543 extern u32 * nfs_decode_dirent(u32 *, struct nfs_entry *, int);
544
545 static void
546 nfs_read_done(struct rpc_task *task)
547 {
548         struct nfs_read_data *data = (struct nfs_read_data *) task->tk_calldata;
549
550         if (task->tk_status >= 0) {
551                 nfs_refresh_inode(data->inode, data->res.fattr);
552                 /* Emulate the eof flag, which isn't normally needed in NFSv2
553                  * as it is guaranteed to always return the file attributes
554                  */
555                 if (data->args.offset + data->args.count >= data->res.fattr->size)
556                         data->res.eof = 1;
557         }
558         nfs_readpage_result(task);
559 }
560
561 static void
562 nfs_proc_read_setup(struct nfs_read_data *data)
563 {
564         struct rpc_task         *task = &data->task;
565         struct inode            *inode = data->inode;
566         int                     flags;
567         struct rpc_message      msg = {
568                 .rpc_proc       = &nfs_procedures[NFSPROC_READ],
569                 .rpc_argp       = &data->args,
570                 .rpc_resp       = &data->res,
571                 .rpc_cred       = data->cred,
572         };
573
574         /* N.B. Do we need to test? Never called for swapfile inode */
575         flags = RPC_TASK_ASYNC | (IS_SWAPFILE(inode)? NFS_RPC_SWAPFLAGS : 0);
576
577         /* Finalize the task. */
578         rpc_init_task(task, NFS_CLIENT(inode), nfs_read_done, flags);
579         rpc_call_setup(task, &msg, 0);
580 }
581
582 static void
583 nfs_write_done(struct rpc_task *task)
584 {
585         struct nfs_write_data *data = (struct nfs_write_data *) task->tk_calldata;
586
587         if (task->tk_status >= 0)
588                 nfs_refresh_inode(data->inode, data->res.fattr);
589         nfs_writeback_done(task);
590 }
591
592 static void
593 nfs_proc_write_setup(struct nfs_write_data *data, int how)
594 {
595         struct rpc_task         *task = &data->task;
596         struct inode            *inode = data->inode;
597         int                     flags;
598         struct rpc_message      msg = {
599                 .rpc_proc       = &nfs_procedures[NFSPROC_WRITE],
600                 .rpc_argp       = &data->args,
601                 .rpc_resp       = &data->res,
602                 .rpc_cred       = data->cred,
603         };
604
605         /* Note: NFSv2 ignores @stable and always uses NFS_FILE_SYNC */
606         data->args.stable = NFS_FILE_SYNC;
607
608         /* Set the initial flags for the task.  */
609         flags = (how & FLUSH_SYNC) ? 0 : RPC_TASK_ASYNC;
610
611         /* Finalize the task. */
612         rpc_init_task(task, NFS_CLIENT(inode), nfs_write_done, flags);
613         rpc_call_setup(task, &msg, 0);
614 }
615
616 static void
617 nfs_proc_commit_setup(struct nfs_write_data *data, int how)
618 {
619         BUG();
620 }
621
622 /*
623  * Set up the nfspage struct with the right credentials
624  */
625 static void
626 nfs_request_init(struct nfs_page *req, struct file *filp)
627 {
628         req->wb_cred = get_rpccred(nfs_cred(req->wb_inode, filp));
629 }
630
631 static int
632 nfs_request_compatible(struct nfs_page *req, struct file *filp, struct page *page)
633 {
634         if (req->wb_file != filp)
635                 return 0;
636         if (req->wb_page != page)
637                 return 0;
638         if (req->wb_cred != nfs_file_cred(filp))
639                 return 0;
640         return 1;
641 }
642
643 static int
644 nfs_proc_lock(struct file *filp, int cmd, struct file_lock *fl)
645 {
646         return nlmclnt_proc(filp->f_dentry->d_inode, cmd, fl);
647 }
648
649
650 struct nfs_rpc_ops      nfs_v2_clientops = {
651         .version        = 2,                   /* protocol version */
652         .dentry_ops     = &nfs_dentry_operations,
653         .dir_inode_ops  = &nfs_dir_inode_operations,
654         .getroot        = nfs_proc_get_root,
655         .getattr        = nfs_proc_getattr,
656         .setattr        = nfs_proc_setattr,
657         .lookup         = nfs_proc_lookup,
658         .access         = NULL,                /* access */
659         .readlink       = nfs_proc_readlink,
660         .read           = nfs_proc_read,
661         .write          = nfs_proc_write,
662         .commit         = NULL,                /* commit */
663         .create         = nfs_proc_create,
664         .remove         = nfs_proc_remove,
665         .unlink_setup   = nfs_proc_unlink_setup,
666         .unlink_done    = nfs_proc_unlink_done,
667         .rename         = nfs_proc_rename,
668         .link           = nfs_proc_link,
669         .symlink        = nfs_proc_symlink,
670         .mkdir          = nfs_proc_mkdir,
671         .rmdir          = nfs_proc_rmdir,
672         .readdir        = nfs_proc_readdir,
673         .mknod          = nfs_proc_mknod,
674         .statfs         = nfs_proc_statfs,
675         .fsinfo         = nfs_proc_fsinfo,
676         .pathconf       = nfs_proc_pathconf,
677         .decode_dirent  = nfs_decode_dirent,
678         .read_setup     = nfs_proc_read_setup,
679         .write_setup    = nfs_proc_write_setup,
680         .commit_setup   = nfs_proc_commit_setup,
681         .file_open      = nfs_open,
682         .file_release   = nfs_release,
683         .request_init   = nfs_request_init,
684         .request_compatible = nfs_request_compatible,
685         .lock           = nfs_proc_lock,
686 };