vserver 1.9.3
[linux-2.6.git] / fs / xfs / linux-2.6 / xfs_iops.c
1 /*
2  * Copyright (c) 2000-2004 Silicon Graphics, Inc.  All Rights Reserved.
3  *
4  * This program is free software; you can redistribute it and/or modify it
5  * under the terms of version 2 of the GNU General Public License as
6  * published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it would be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11  *
12  * Further, this software is distributed without any warranty that it is
13  * free of the rightful claim of any third person regarding infringement
14  * or the like.  Any license provided herein, whether implied or
15  * otherwise, applies only to this software file.  Patent licenses, if
16  * any, provided herein do not apply to combinations of this program with
17  * other software, or any other product whatsoever.
18  *
19  * You should have received a copy of the GNU General Public License along
20  * with this program; if not, write the Free Software Foundation, Inc., 59
21  * Temple Place - Suite 330, Boston MA 02111-1307, USA.
22  *
23  * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy,
24  * Mountain View, CA  94043, or:
25  *
26  * http://www.sgi.com
27  *
28  * For further information regarding this notice, see:
29  *
30  * http://oss.sgi.com/projects/GenInfo/SGIGPLNoticeExplan/
31  */
32
33 #include "xfs.h"
34 #include "xfs_fs.h"
35 #include "xfs_inum.h"
36 #include "xfs_log.h"
37 #include "xfs_trans.h"
38 #include "xfs_sb.h"
39 #include "xfs_ag.h"
40 #include "xfs_dir.h"
41 #include "xfs_dir2.h"
42 #include "xfs_alloc.h"
43 #include "xfs_dmapi.h"
44 #include "xfs_quota.h"
45 #include "xfs_mount.h"
46 #include "xfs_alloc_btree.h"
47 #include "xfs_bmap_btree.h"
48 #include "xfs_ialloc_btree.h"
49 #include "xfs_btree.h"
50 #include "xfs_ialloc.h"
51 #include "xfs_attr_sf.h"
52 #include "xfs_dir_sf.h"
53 #include "xfs_dir2_sf.h"
54 #include "xfs_dinode.h"
55 #include "xfs_inode.h"
56 #include "xfs_bmap.h"
57 #include "xfs_bit.h"
58 #include "xfs_rtalloc.h"
59 #include "xfs_error.h"
60 #include "xfs_itable.h"
61 #include "xfs_rw.h"
62 #include "xfs_acl.h"
63 #include "xfs_cap.h"
64 #include "xfs_mac.h"
65 #include "xfs_attr.h"
66 #include "xfs_buf_item.h"
67 #include "xfs_utils.h"
68
69 #include <linux/xattr.h>
70 #include <linux/namei.h>
71
72
73 /*
74  * Pull the link count and size up from the xfs inode to the linux inode
75  */
76 STATIC void
77 validate_fields(
78         struct inode    *ip)
79 {
80         vnode_t         *vp = LINVFS_GET_VP(ip);
81         vattr_t         va;
82         int             error;
83
84         va.va_mask = XFS_AT_NLINK|XFS_AT_SIZE|XFS_AT_NBLOCKS;
85         VOP_GETATTR(vp, &va, ATTR_LAZY, NULL, error);
86         if (likely(!error)) {
87                 ip->i_nlink = va.va_nlink;
88                 ip->i_blocks = va.va_nblocks;
89
90                 /* we're under i_sem so i_size can't change under us */
91                 if (i_size_read(ip) != va.va_size)
92                         i_size_write(ip, va.va_size);
93         }
94 }
95
96 /*
97  * Determine whether a process has a valid fs_struct (kernel daemons
98  * like knfsd don't have an fs_struct).
99  *
100  * XXX(hch):  nfsd is broken, better fix it instead.
101  */
102 STATIC inline int
103 has_fs_struct(struct task_struct *task)
104 {
105         return (task->fs != init_task.fs);
106 }
107
108 STATIC int
109 linvfs_mknod(
110         struct inode    *dir,
111         struct dentry   *dentry,
112         int             mode,
113         dev_t           rdev)
114 {
115         struct inode    *ip;
116         vattr_t         va;
117         vnode_t         *vp = NULL, *dvp = LINVFS_GET_VP(dir);
118         xfs_acl_t       *default_acl = NULL;
119         attrexists_t    test_default_acl = _ACL_DEFAULT_EXISTS;
120         int             error;
121
122         /*
123          * Irix uses Missed'em'V split, but doesn't want to see
124          * the upper 5 bits of (14bit) major.
125          */
126         if (!sysv_valid_dev(rdev) || MAJOR(rdev) & ~0x1ff)
127                 return -EINVAL;
128
129         if (test_default_acl && test_default_acl(dvp)) {
130                 if (!_ACL_ALLOC(default_acl))
131                         return -ENOMEM;
132                 if (!_ACL_GET_DEFAULT(dvp, default_acl)) {
133                         _ACL_FREE(default_acl);
134                         default_acl = NULL;
135                 }
136         }
137
138         if (IS_POSIXACL(dir) && !default_acl && has_fs_struct(current))
139                 mode &= ~current->fs->umask;
140
141         memset(&va, 0, sizeof(va));
142         va.va_mask = XFS_AT_TYPE|XFS_AT_MODE;
143         va.va_type = IFTOVT(mode);
144         va.va_mode = mode;
145
146         switch (mode & S_IFMT) {
147         case S_IFCHR: case S_IFBLK: case S_IFIFO: case S_IFSOCK:
148                 va.va_rdev = sysv_encode_dev(rdev);
149                 va.va_mask |= XFS_AT_RDEV;
150                 /*FALLTHROUGH*/
151         case S_IFREG:
152                 VOP_CREATE(dvp, dentry, &va, &vp, NULL, error);
153                 break;
154         case S_IFDIR:
155                 VOP_MKDIR(dvp, dentry, &va, &vp, NULL, error);
156                 break;
157         default:
158                 error = EINVAL;
159                 break;
160         }
161
162         if (default_acl) {
163                 if (!error) {
164                         error = _ACL_INHERIT(vp, &va, default_acl);
165                         if (!error) {
166                                 VMODIFY(vp);
167                         } else {
168                                 struct dentry   teardown = {};
169                                 int             err2;
170
171                                 /* Oh, the horror.
172                                  * If we can't add the ACL we must back out.
173                                  * ENOSPC can hit here, among other things.
174                                  */
175                                 teardown.d_inode = ip = LINVFS_GET_IP(vp);
176                                 teardown.d_name = dentry->d_name;
177
178                                 vn_mark_bad(vp);
179                                 
180                                 if (S_ISDIR(mode))
181                                         VOP_RMDIR(dvp, &teardown, NULL, err2);
182                                 else
183                                         VOP_REMOVE(dvp, &teardown, NULL, err2);
184                                 VN_RELE(vp);
185                         }
186                 }
187                 _ACL_FREE(default_acl);
188         }
189
190         if (!error) {
191                 ASSERT(vp);
192                 ip = LINVFS_GET_IP(vp);
193
194                 if (S_ISCHR(mode) || S_ISBLK(mode))
195                         ip->i_rdev = rdev;
196                 else if (S_ISDIR(mode))
197                         validate_fields(ip);
198                 d_instantiate(dentry, ip);
199                 validate_fields(dir);
200         }
201         return -error;
202 }
203
204 STATIC int
205 linvfs_create(
206         struct inode    *dir,
207         struct dentry   *dentry,
208         int             mode,
209         struct nameidata *nd)
210 {
211         return linvfs_mknod(dir, dentry, mode, 0);
212 }
213
214 STATIC int
215 linvfs_mkdir(
216         struct inode    *dir,
217         struct dentry   *dentry,
218         int             mode)
219 {
220         return linvfs_mknod(dir, dentry, mode|S_IFDIR, 0);
221 }
222
223 STATIC struct dentry *
224 linvfs_lookup(
225         struct inode    *dir,
226         struct dentry   *dentry,
227         struct nameidata *nd)
228 {
229         struct vnode    *vp = LINVFS_GET_VP(dir), *cvp;
230         int             error;
231
232         if (dentry->d_name.len >= MAXNAMELEN)
233                 return ERR_PTR(-ENAMETOOLONG);
234
235         VOP_LOOKUP(vp, dentry, &cvp, 0, NULL, NULL, error);
236         if (error) {
237                 if (unlikely(error != ENOENT))
238                         return ERR_PTR(-error);
239                 d_add(dentry, NULL);
240                 return NULL;
241         }
242
243         return d_splice_alias(LINVFS_GET_IP(cvp), dentry);
244 }
245
246 STATIC int
247 linvfs_link(
248         struct dentry   *old_dentry,
249         struct inode    *dir,
250         struct dentry   *dentry)
251 {
252         struct inode    *ip;    /* inode of guy being linked to */
253         vnode_t         *tdvp;  /* target directory for new name/link */
254         vnode_t         *vp;    /* vp of name being linked */
255         int             error;
256
257         ip = old_dentry->d_inode;       /* inode being linked to */
258         if (S_ISDIR(ip->i_mode))
259                 return -EPERM;
260
261         tdvp = LINVFS_GET_VP(dir);
262         vp = LINVFS_GET_VP(ip);
263
264         VOP_LINK(tdvp, vp, dentry, NULL, error);
265         if (!error) {
266                 VMODIFY(tdvp);
267                 VN_HOLD(vp);
268                 validate_fields(ip);
269                 d_instantiate(dentry, ip);
270         }
271         return -error;
272 }
273
274 STATIC int
275 linvfs_unlink(
276         struct inode    *dir,
277         struct dentry   *dentry)
278 {
279         struct inode    *inode;
280         vnode_t         *dvp;   /* directory containing name to remove */
281         int             error;
282
283         inode = dentry->d_inode;
284         dvp = LINVFS_GET_VP(dir);
285
286         VOP_REMOVE(dvp, dentry, NULL, error);
287         if (!error) {
288                 validate_fields(dir);   /* For size only */
289                 validate_fields(inode);
290         }
291
292         return -error;
293 }
294
295 STATIC int
296 linvfs_symlink(
297         struct inode    *dir,
298         struct dentry   *dentry,
299         const char      *symname)
300 {
301         struct inode    *ip;
302         vattr_t         va;
303         vnode_t         *dvp;   /* directory containing name of symlink */
304         vnode_t         *cvp;   /* used to lookup symlink to put in dentry */
305         int             error;
306
307         dvp = LINVFS_GET_VP(dir);
308         cvp = NULL;
309
310         memset(&va, 0, sizeof(va));
311         va.va_type = VLNK;
312         va.va_mode = irix_symlink_mode ? 0777 & ~current->fs->umask : S_IRWXUGO;
313         va.va_mask = XFS_AT_TYPE|XFS_AT_MODE;
314
315         error = 0;
316         VOP_SYMLINK(dvp, dentry, &va, (char *)symname, &cvp, NULL, error);
317         if (!error && cvp) {
318                 ASSERT(cvp->v_type == VLNK);
319                 ip = LINVFS_GET_IP(cvp);
320                 d_instantiate(dentry, ip);
321                 validate_fields(dir);
322                 validate_fields(ip); /* size needs update */
323         }
324         return -error;
325 }
326
327 STATIC int
328 linvfs_rmdir(
329         struct inode    *dir,
330         struct dentry   *dentry)
331 {
332         struct inode    *inode = dentry->d_inode;
333         vnode_t         *dvp = LINVFS_GET_VP(dir);
334         int             error;
335
336         VOP_RMDIR(dvp, dentry, NULL, error);
337         if (!error) {
338                 validate_fields(inode);
339                 validate_fields(dir);
340         }
341         return -error;
342 }
343
344 STATIC int
345 linvfs_rename(
346         struct inode    *odir,
347         struct dentry   *odentry,
348         struct inode    *ndir,
349         struct dentry   *ndentry)
350 {
351         struct inode    *new_inode = ndentry->d_inode;
352         vnode_t         *fvp;   /* from directory */
353         vnode_t         *tvp;   /* target directory */
354         int             error;
355
356         fvp = LINVFS_GET_VP(odir);
357         tvp = LINVFS_GET_VP(ndir);
358
359         VOP_RENAME(fvp, odentry, tvp, ndentry, NULL, error);
360         if (error)
361                 return -error;
362
363         if (new_inode)
364                 validate_fields(new_inode);
365
366         validate_fields(odir);
367         if (ndir != odir)
368                 validate_fields(ndir);
369         return 0;
370 }
371
372 STATIC int
373 linvfs_readlink(
374         struct dentry   *dentry,
375         char            __user *buf,
376         int             size)
377 {
378         vnode_t         *vp = LINVFS_GET_VP(dentry->d_inode);
379         uio_t           uio;
380         iovec_t         iov;
381         int             error;
382
383         iov.iov_base = buf;
384         iov.iov_len = size;
385
386         uio.uio_iov = &iov;
387         uio.uio_offset = 0;
388         uio.uio_segflg = UIO_USERSPACE;
389         uio.uio_resid = size;
390         uio.uio_iovcnt = 1;
391
392         VOP_READLINK(vp, &uio, 0, NULL, error);
393         if (error)
394                 return -error;
395
396         return (size - uio.uio_resid);
397 }
398
399 /*
400  * careful here - this function can get called recursively, so
401  * we need to be very careful about how much stack we use.
402  * uio is kmalloced for this reason...
403  */
404 STATIC int
405 linvfs_follow_link(
406         struct dentry           *dentry,
407         struct nameidata        *nd)
408 {
409         vnode_t                 *vp;
410         uio_t                   *uio;
411         iovec_t                 iov;
412         int                     error;
413         char                    *link;
414
415         ASSERT(dentry);
416         ASSERT(nd);
417
418         link = (char *)kmalloc(MAXNAMELEN+1, GFP_KERNEL);
419         if (!link) {
420                 nd_set_link(nd, ERR_PTR(-ENOMEM));
421                 return 0;
422         }
423
424         uio = (uio_t *)kmalloc(sizeof(uio_t), GFP_KERNEL);
425         if (!uio) {
426                 kfree(link);
427                 nd_set_link(nd, ERR_PTR(-ENOMEM));
428                 return 0;
429         }
430
431         vp = LINVFS_GET_VP(dentry->d_inode);
432
433         iov.iov_base = link;
434         iov.iov_len = MAXNAMELEN;
435
436         uio->uio_iov = &iov;
437         uio->uio_offset = 0;
438         uio->uio_segflg = UIO_SYSSPACE;
439         uio->uio_resid = MAXNAMELEN;
440         uio->uio_iovcnt = 1;
441
442         VOP_READLINK(vp, uio, 0, NULL, error);
443         if (error) {
444                 kfree(link);
445                 link = ERR_PTR(-error);
446         } else {
447                 link[MAXNAMELEN - uio->uio_resid] = '\0';
448         }
449         kfree(uio);
450
451         nd_set_link(nd, link);
452         return 0;
453 }
454
455 static void linvfs_put_link(struct dentry *dentry, struct nameidata *nd)
456 {
457         char *s = nd_get_link(nd);
458         if (!IS_ERR(s))
459                 kfree(s);
460 }
461
462 #ifdef CONFIG_XFS_POSIX_ACL
463 STATIC int
464 linvfs_permission(
465         struct inode    *inode,
466         int             mode,
467         struct nameidata *nd)
468 {
469         vnode_t         *vp = LINVFS_GET_VP(inode);
470         int             error;
471
472         mode <<= 6;             /* convert from linux to vnode access bits */
473         VOP_ACCESS(vp, mode, NULL, error);
474         return -error;
475 }
476 #else
477 #define linvfs_permission NULL
478 #endif
479
480 STATIC int
481 linvfs_getattr(
482         struct vfsmount *mnt,
483         struct dentry   *dentry,
484         struct kstat    *stat)
485 {
486         struct inode    *inode = dentry->d_inode;
487         vnode_t         *vp = LINVFS_GET_VP(inode);
488         int             error = 0;
489
490         if (unlikely(vp->v_flag & VMODIFIED))
491                 error = vn_revalidate(vp);
492         if (!error)
493                 generic_fillattr(inode, stat);
494         return 0;
495 }
496
497 STATIC int
498 linvfs_setattr_flags(
499         vattr_t *vap,
500         unsigned int flags)
501 {
502         unsigned int oldflags, newflags;
503
504         oldflags = vap->va_xflags;
505         newflags = oldflags & ~(XFS_XFLAG_IMMUTABLE |
506                 XFS_XFLAG_IUNLINK | XFS_XFLAG_BARRIER);
507         if (flags & ATTR_FLAG_IMMUTABLE)
508                 newflags |= XFS_XFLAG_IMMUTABLE;
509         if (flags & ATTR_FLAG_IUNLINK)
510                 newflags |= XFS_XFLAG_IUNLINK;
511         if (flags & ATTR_FLAG_BARRIER)
512                 newflags |= XFS_XFLAG_BARRIER;
513
514         if (oldflags ^ newflags)
515                 vap->va_xflags = newflags;
516         return 0;
517 }
518
519 STATIC int
520 linvfs_setattr(
521         struct dentry   *dentry,
522         struct iattr    *attr)
523 {
524         struct inode    *inode = dentry->d_inode;
525         unsigned int    ia_valid = attr->ia_valid;
526         vnode_t         *vp = LINVFS_GET_VP(inode);
527         vattr_t         vattr;
528         int             flags = 0;
529         int             error;
530
531         memset(&vattr, 0, sizeof(vattr_t));
532         if (ia_valid & ATTR_UID) {
533                 vattr.va_mask |= XFS_AT_UID;
534                 vattr.va_uid = attr->ia_uid;
535         }
536         if (ia_valid & ATTR_GID) {
537                 vattr.va_mask |= XFS_AT_GID;
538                 vattr.va_gid = attr->ia_gid;
539         }
540         if (ia_valid & ATTR_SIZE) {
541                 vattr.va_mask |= XFS_AT_SIZE;
542                 vattr.va_size = attr->ia_size;
543         }
544         if (ia_valid & ATTR_ATIME) {
545                 vattr.va_mask |= XFS_AT_ATIME;
546                 vattr.va_atime = attr->ia_atime;
547         }
548         if (ia_valid & ATTR_MTIME) {
549                 vattr.va_mask |= XFS_AT_MTIME;
550                 vattr.va_mtime = attr->ia_mtime;
551         }
552         if (ia_valid & ATTR_CTIME) {
553                 vattr.va_mask |= XFS_AT_CTIME;
554                 vattr.va_ctime = attr->ia_ctime;
555         }
556         if (ia_valid & ATTR_MODE) {
557                 vattr.va_mask |= XFS_AT_MODE;
558                 vattr.va_mode = attr->ia_mode;
559                 if (!in_group_p(inode->i_gid) && !capable(CAP_FSETID))
560                         inode->i_mode &= ~S_ISGID;
561         }
562
563         if (ia_valid & (ATTR_MTIME_SET | ATTR_ATIME_SET))
564                 flags |= ATTR_UTIME;
565 #ifdef ATTR_NO_BLOCK
566         if ((ia_valid & ATTR_NO_BLOCK))
567                 flags |= ATTR_NONBLOCK;
568 #endif
569
570         if (ia_valid & ATTR_ATTR_FLAG) {
571                 vattr.va_mask |= XFS_AT_XFLAGS;
572                 linvfs_setattr_flags(&vattr, attr->ia_attr_flags);
573         }
574
575         VOP_SETATTR(vp, &vattr, flags, NULL, error);
576         if (error)
577                 return -error;
578         vn_revalidate(vp);
579         return error;
580 }
581
582 STATIC void
583 linvfs_truncate(
584         struct inode    *inode)
585 {
586         block_truncate_page(inode->i_mapping, inode->i_size, linvfs_get_block);
587 }
588
589 STATIC int
590 linvfs_setxattr(
591         struct dentry   *dentry,
592         const char      *name,
593         const void      *data,
594         size_t          size,
595         int             flags)
596 {
597         vnode_t         *vp = LINVFS_GET_VP(dentry->d_inode);
598         char            *attr = (char *)name;
599         attrnames_t     *namesp;
600         int             xflags = 0;
601         int             error;
602
603         namesp = attr_lookup_namespace(attr, attr_namespaces, ATTR_NAMECOUNT);
604         if (!namesp)
605                 return -EOPNOTSUPP;
606         attr += namesp->attr_namelen;
607         error = namesp->attr_capable(vp, NULL);
608         if (error)
609                 return error;
610
611         /* Convert Linux syscall to XFS internal ATTR flags */
612         if (flags & XATTR_CREATE)
613                 xflags |= ATTR_CREATE;
614         if (flags & XATTR_REPLACE)
615                 xflags |= ATTR_REPLACE;
616         xflags |= namesp->attr_flag;
617         return namesp->attr_set(vp, attr, (void *)data, size, xflags);
618 }
619
620 STATIC ssize_t
621 linvfs_getxattr(
622         struct dentry   *dentry,
623         const char      *name,
624         void            *data,
625         size_t          size)
626 {
627         vnode_t         *vp = LINVFS_GET_VP(dentry->d_inode);
628         char            *attr = (char *)name;
629         attrnames_t     *namesp;
630         int             xflags = 0;
631         ssize_t         error;
632
633         namesp = attr_lookup_namespace(attr, attr_namespaces, ATTR_NAMECOUNT);
634         if (!namesp)
635                 return -EOPNOTSUPP;
636         attr += namesp->attr_namelen;
637         error = namesp->attr_capable(vp, NULL);
638         if (error)
639                 return error;
640
641         /* Convert Linux syscall to XFS internal ATTR flags */
642         if (!size) {
643                 xflags |= ATTR_KERNOVAL;
644                 data = NULL;
645         }
646         xflags |= namesp->attr_flag;
647         return namesp->attr_get(vp, attr, (void *)data, size, xflags);
648 }
649
650 STATIC ssize_t
651 linvfs_listxattr(
652         struct dentry           *dentry,
653         char                    *data,
654         size_t                  size)
655 {
656         vnode_t                 *vp = LINVFS_GET_VP(dentry->d_inode);
657         int                     error, xflags = ATTR_KERNAMELS;
658         ssize_t                 result;
659
660         if (!size)
661                 xflags |= ATTR_KERNOVAL;
662         xflags |= capable(CAP_SYS_ADMIN) ? ATTR_KERNFULLS : ATTR_KERNORMALS;
663
664         error = attr_generic_list(vp, data, size, xflags, &result);
665         if (error < 0)
666                 return error;
667         return result;
668 }
669
670 STATIC int
671 linvfs_removexattr(
672         struct dentry   *dentry,
673         const char      *name)
674 {
675         vnode_t         *vp = LINVFS_GET_VP(dentry->d_inode);
676         char            *attr = (char *)name;
677         attrnames_t     *namesp;
678         int             xflags = 0;
679         int             error;
680
681         namesp = attr_lookup_namespace(attr, attr_namespaces, ATTR_NAMECOUNT);
682         if (!namesp)
683                 return -EOPNOTSUPP;
684         attr += namesp->attr_namelen;
685         error = namesp->attr_capable(vp, NULL);
686         if (error)
687                 return error;
688         xflags |= namesp->attr_flag;
689         return namesp->attr_remove(vp, attr, xflags);
690 }
691
692
693 struct inode_operations linvfs_file_inode_operations = {
694         .permission             = linvfs_permission,
695         .truncate               = linvfs_truncate,
696         .getattr                = linvfs_getattr,
697         .setattr                = linvfs_setattr,
698         .setxattr               = linvfs_setxattr,
699         .getxattr               = linvfs_getxattr,
700         .listxattr              = linvfs_listxattr,
701         .removexattr            = linvfs_removexattr,
702 };
703
704 struct inode_operations linvfs_dir_inode_operations = {
705         .create                 = linvfs_create,
706         .lookup                 = linvfs_lookup,
707         .link                   = linvfs_link,
708         .unlink                 = linvfs_unlink,
709         .symlink                = linvfs_symlink,
710         .mkdir                  = linvfs_mkdir,
711         .rmdir                  = linvfs_rmdir,
712         .mknod                  = linvfs_mknod,
713         .rename                 = linvfs_rename,
714         .permission             = linvfs_permission,
715         .getattr                = linvfs_getattr,
716         .setattr                = linvfs_setattr,
717         .setxattr               = linvfs_setxattr,
718         .getxattr               = linvfs_getxattr,
719         .listxattr              = linvfs_listxattr,
720         .removexattr            = linvfs_removexattr,
721 };
722
723 struct inode_operations linvfs_symlink_inode_operations = {
724         .readlink               = linvfs_readlink,
725         .follow_link            = linvfs_follow_link,
726         .put_link               = linvfs_put_link,
727         .permission             = linvfs_permission,
728         .getattr                = linvfs_getattr,
729         .setattr                = linvfs_setattr,
730         .setxattr               = linvfs_setxattr,
731         .getxattr               = linvfs_getxattr,
732         .listxattr              = linvfs_listxattr,
733         .removexattr            = linvfs_removexattr,
734 };