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