xfs_iops.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683
  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. #include "xfs.h"
  33. #include "xfs_fs.h"
  34. #include "xfs_inum.h"
  35. #include "xfs_log.h"
  36. #include "xfs_trans.h"
  37. #include "xfs_sb.h"
  38. #include "xfs_ag.h"
  39. #include "xfs_dir.h"
  40. #include "xfs_dir2.h"
  41. #include "xfs_alloc.h"
  42. #include "xfs_dmapi.h"
  43. #include "xfs_quota.h"
  44. #include "xfs_mount.h"
  45. #include "xfs_alloc_btree.h"
  46. #include "xfs_bmap_btree.h"
  47. #include "xfs_ialloc_btree.h"
  48. #include "xfs_btree.h"
  49. #include "xfs_ialloc.h"
  50. #include "xfs_attr_sf.h"
  51. #include "xfs_dir_sf.h"
  52. #include "xfs_dir2_sf.h"
  53. #include "xfs_dinode.h"
  54. #include "xfs_inode.h"
  55. #include "xfs_bmap.h"
  56. #include "xfs_bit.h"
  57. #include "xfs_rtalloc.h"
  58. #include "xfs_error.h"
  59. #include "xfs_itable.h"
  60. #include "xfs_rw.h"
  61. #include "xfs_acl.h"
  62. #include "xfs_cap.h"
  63. #include "xfs_mac.h"
  64. #include "xfs_attr.h"
  65. #include "xfs_buf_item.h"
  66. #include "xfs_utils.h"
  67. #include <linux/xattr.h>
  68. #include <linux/namei.h>
  69. /*
  70. * Pull the link count and size up from the xfs inode to the linux inode
  71. */
  72. STATIC void
  73. validate_fields(
  74. struct inode *ip)
  75. {
  76. vnode_t *vp = LINVFS_GET_VP(ip);
  77. vattr_t va;
  78. int error;
  79. va.va_mask = XFS_AT_NLINK|XFS_AT_SIZE|XFS_AT_NBLOCKS;
  80. VOP_GETATTR(vp, &va, ATTR_LAZY, NULL, error);
  81. if (likely(!error)) {
  82. ip->i_nlink = va.va_nlink;
  83. ip->i_blocks = va.va_nblocks;
  84. /* we're under i_sem so i_size can't change under us */
  85. if (i_size_read(ip) != va.va_size)
  86. i_size_write(ip, va.va_size);
  87. }
  88. }
  89. /*
  90. * Determine whether a process has a valid fs_struct (kernel daemons
  91. * like knfsd don't have an fs_struct).
  92. *
  93. * XXX(hch): nfsd is broken, better fix it instead.
  94. */
  95. STATIC inline int
  96. has_fs_struct(struct task_struct *task)
  97. {
  98. return (task->fs != init_task.fs);
  99. }
  100. STATIC int
  101. linvfs_mknod(
  102. struct inode *dir,
  103. struct dentry *dentry,
  104. int mode,
  105. dev_t rdev)
  106. {
  107. struct inode *ip;
  108. vattr_t va;
  109. vnode_t *vp = NULL, *dvp = LINVFS_GET_VP(dir);
  110. xfs_acl_t *default_acl = NULL;
  111. attrexists_t test_default_acl = _ACL_DEFAULT_EXISTS;
  112. int error;
  113. /*
  114. * Irix uses Missed'em'V split, but doesn't want to see
  115. * the upper 5 bits of (14bit) major.
  116. */
  117. if (!sysv_valid_dev(rdev) || MAJOR(rdev) & ~0x1ff)
  118. return -EINVAL;
  119. if (test_default_acl && test_default_acl(dvp)) {
  120. if (!_ACL_ALLOC(default_acl))
  121. return -ENOMEM;
  122. if (!_ACL_GET_DEFAULT(dvp, default_acl)) {
  123. _ACL_FREE(default_acl);
  124. default_acl = NULL;
  125. }
  126. }
  127. if (IS_POSIXACL(dir) && !default_acl && has_fs_struct(current))
  128. mode &= ~current->fs->umask;
  129. memset(&va, 0, sizeof(va));
  130. va.va_mask = XFS_AT_TYPE|XFS_AT_MODE;
  131. va.va_mode = mode;
  132. switch (mode & S_IFMT) {
  133. case S_IFCHR: case S_IFBLK: case S_IFIFO: case S_IFSOCK:
  134. va.va_rdev = sysv_encode_dev(rdev);
  135. va.va_mask |= XFS_AT_RDEV;
  136. /*FALLTHROUGH*/
  137. case S_IFREG:
  138. VOP_CREATE(dvp, dentry, &va, &vp, NULL, error);
  139. break;
  140. case S_IFDIR:
  141. VOP_MKDIR(dvp, dentry, &va, &vp, NULL, error);
  142. break;
  143. default:
  144. error = EINVAL;
  145. break;
  146. }
  147. if (default_acl) {
  148. if (!error) {
  149. error = _ACL_INHERIT(vp, &va, default_acl);
  150. if (!error) {
  151. VMODIFY(vp);
  152. } else {
  153. struct dentry teardown = {};
  154. int err2;
  155. /* Oh, the horror.
  156. * If we can't add the ACL we must back out.
  157. * ENOSPC can hit here, among other things.
  158. */
  159. teardown.d_inode = ip = LINVFS_GET_IP(vp);
  160. teardown.d_name = dentry->d_name;
  161. vn_mark_bad(vp);
  162. if (S_ISDIR(mode))
  163. VOP_RMDIR(dvp, &teardown, NULL, err2);
  164. else
  165. VOP_REMOVE(dvp, &teardown, NULL, err2);
  166. VN_RELE(vp);
  167. }
  168. }
  169. _ACL_FREE(default_acl);
  170. }
  171. if (!error) {
  172. ASSERT(vp);
  173. ip = LINVFS_GET_IP(vp);
  174. if (S_ISCHR(mode) || S_ISBLK(mode))
  175. ip->i_rdev = rdev;
  176. else if (S_ISDIR(mode))
  177. validate_fields(ip);
  178. d_instantiate(dentry, ip);
  179. validate_fields(dir);
  180. }
  181. return -error;
  182. }
  183. STATIC int
  184. linvfs_create(
  185. struct inode *dir,
  186. struct dentry *dentry,
  187. int mode,
  188. struct nameidata *nd)
  189. {
  190. return linvfs_mknod(dir, dentry, mode, 0);
  191. }
  192. STATIC int
  193. linvfs_mkdir(
  194. struct inode *dir,
  195. struct dentry *dentry,
  196. int mode)
  197. {
  198. return linvfs_mknod(dir, dentry, mode|S_IFDIR, 0);
  199. }
  200. STATIC struct dentry *
  201. linvfs_lookup(
  202. struct inode *dir,
  203. struct dentry *dentry,
  204. struct nameidata *nd)
  205. {
  206. struct vnode *vp = LINVFS_GET_VP(dir), *cvp;
  207. int error;
  208. if (dentry->d_name.len >= MAXNAMELEN)
  209. return ERR_PTR(-ENAMETOOLONG);
  210. VOP_LOOKUP(vp, dentry, &cvp, 0, NULL, NULL, error);
  211. if (error) {
  212. if (unlikely(error != ENOENT))
  213. return ERR_PTR(-error);
  214. d_add(dentry, NULL);
  215. return NULL;
  216. }
  217. return d_splice_alias(LINVFS_GET_IP(cvp), dentry);
  218. }
  219. STATIC int
  220. linvfs_link(
  221. struct dentry *old_dentry,
  222. struct inode *dir,
  223. struct dentry *dentry)
  224. {
  225. struct inode *ip; /* inode of guy being linked to */
  226. vnode_t *tdvp; /* target directory for new name/link */
  227. vnode_t *vp; /* vp of name being linked */
  228. int error;
  229. ip = old_dentry->d_inode; /* inode being linked to */
  230. if (S_ISDIR(ip->i_mode))
  231. return -EPERM;
  232. tdvp = LINVFS_GET_VP(dir);
  233. vp = LINVFS_GET_VP(ip);
  234. VOP_LINK(tdvp, vp, dentry, NULL, error);
  235. if (!error) {
  236. VMODIFY(tdvp);
  237. VN_HOLD(vp);
  238. validate_fields(ip);
  239. d_instantiate(dentry, ip);
  240. }
  241. return -error;
  242. }
  243. STATIC int
  244. linvfs_unlink(
  245. struct inode *dir,
  246. struct dentry *dentry)
  247. {
  248. struct inode *inode;
  249. vnode_t *dvp; /* directory containing name to remove */
  250. int error;
  251. inode = dentry->d_inode;
  252. dvp = LINVFS_GET_VP(dir);
  253. VOP_REMOVE(dvp, dentry, NULL, error);
  254. if (!error) {
  255. validate_fields(dir); /* For size only */
  256. validate_fields(inode);
  257. }
  258. return -error;
  259. }
  260. STATIC int
  261. linvfs_symlink(
  262. struct inode *dir,
  263. struct dentry *dentry,
  264. const char *symname)
  265. {
  266. struct inode *ip;
  267. vattr_t va;
  268. vnode_t *dvp; /* directory containing name of symlink */
  269. vnode_t *cvp; /* used to lookup symlink to put in dentry */
  270. int error;
  271. dvp = LINVFS_GET_VP(dir);
  272. cvp = NULL;
  273. memset(&va, 0, sizeof(va));
  274. va.va_mode = S_IFLNK |
  275. (irix_symlink_mode ? 0777 & ~current->fs->umask : S_IRWXUGO);
  276. va.va_mask = XFS_AT_TYPE|XFS_AT_MODE;
  277. error = 0;
  278. VOP_SYMLINK(dvp, dentry, &va, (char *)symname, &cvp, NULL, error);
  279. if (!error && cvp) {
  280. ip = LINVFS_GET_IP(cvp);
  281. d_instantiate(dentry, ip);
  282. validate_fields(dir);
  283. validate_fields(ip); /* size needs update */
  284. }
  285. return -error;
  286. }
  287. STATIC int
  288. linvfs_rmdir(
  289. struct inode *dir,
  290. struct dentry *dentry)
  291. {
  292. struct inode *inode = dentry->d_inode;
  293. vnode_t *dvp = LINVFS_GET_VP(dir);
  294. int error;
  295. VOP_RMDIR(dvp, dentry, NULL, error);
  296. if (!error) {
  297. validate_fields(inode);
  298. validate_fields(dir);
  299. }
  300. return -error;
  301. }
  302. STATIC int
  303. linvfs_rename(
  304. struct inode *odir,
  305. struct dentry *odentry,
  306. struct inode *ndir,
  307. struct dentry *ndentry)
  308. {
  309. struct inode *new_inode = ndentry->d_inode;
  310. vnode_t *fvp; /* from directory */
  311. vnode_t *tvp; /* target directory */
  312. int error;
  313. fvp = LINVFS_GET_VP(odir);
  314. tvp = LINVFS_GET_VP(ndir);
  315. VOP_RENAME(fvp, odentry, tvp, ndentry, NULL, error);
  316. if (error)
  317. return -error;
  318. if (new_inode)
  319. validate_fields(new_inode);
  320. validate_fields(odir);
  321. if (ndir != odir)
  322. validate_fields(ndir);
  323. return 0;
  324. }
  325. /*
  326. * careful here - this function can get called recursively, so
  327. * we need to be very careful about how much stack we use.
  328. * uio is kmalloced for this reason...
  329. */
  330. STATIC void *
  331. linvfs_follow_link(
  332. struct dentry *dentry,
  333. struct nameidata *nd)
  334. {
  335. vnode_t *vp;
  336. uio_t *uio;
  337. iovec_t iov;
  338. int error;
  339. char *link;
  340. ASSERT(dentry);
  341. ASSERT(nd);
  342. link = (char *)kmalloc(MAXNAMELEN+1, GFP_KERNEL);
  343. if (!link) {
  344. nd_set_link(nd, ERR_PTR(-ENOMEM));
  345. return NULL;
  346. }
  347. uio = (uio_t *)kmalloc(sizeof(uio_t), GFP_KERNEL);
  348. if (!uio) {
  349. kfree(link);
  350. nd_set_link(nd, ERR_PTR(-ENOMEM));
  351. return NULL;
  352. }
  353. vp = LINVFS_GET_VP(dentry->d_inode);
  354. iov.iov_base = link;
  355. iov.iov_len = MAXNAMELEN;
  356. uio->uio_iov = &iov;
  357. uio->uio_offset = 0;
  358. uio->uio_segflg = UIO_SYSSPACE;
  359. uio->uio_resid = MAXNAMELEN;
  360. uio->uio_iovcnt = 1;
  361. VOP_READLINK(vp, uio, 0, NULL, error);
  362. if (error) {
  363. kfree(link);
  364. link = ERR_PTR(-error);
  365. } else {
  366. link[MAXNAMELEN - uio->uio_resid] = '\0';
  367. }
  368. kfree(uio);
  369. nd_set_link(nd, link);
  370. return NULL;
  371. }
  372. STATIC void
  373. linvfs_put_link(
  374. struct dentry *dentry,
  375. struct nameidata *nd,
  376. void *p)
  377. {
  378. char *s = nd_get_link(nd);
  379. if (!IS_ERR(s))
  380. kfree(s);
  381. }
  382. #ifdef CONFIG_XFS_POSIX_ACL
  383. STATIC int
  384. linvfs_permission(
  385. struct inode *inode,
  386. int mode,
  387. struct nameidata *nd)
  388. {
  389. vnode_t *vp = LINVFS_GET_VP(inode);
  390. int error;
  391. mode <<= 6; /* convert from linux to vnode access bits */
  392. VOP_ACCESS(vp, mode, NULL, error);
  393. return -error;
  394. }
  395. #else
  396. #define linvfs_permission NULL
  397. #endif
  398. STATIC int
  399. linvfs_getattr(
  400. struct vfsmount *mnt,
  401. struct dentry *dentry,
  402. struct kstat *stat)
  403. {
  404. struct inode *inode = dentry->d_inode;
  405. vnode_t *vp = LINVFS_GET_VP(inode);
  406. int error = 0;
  407. if (unlikely(vp->v_flag & VMODIFIED))
  408. error = vn_revalidate(vp);
  409. if (!error)
  410. generic_fillattr(inode, stat);
  411. return 0;
  412. }
  413. STATIC int
  414. linvfs_setattr(
  415. struct dentry *dentry,
  416. struct iattr *attr)
  417. {
  418. struct inode *inode = dentry->d_inode;
  419. unsigned int ia_valid = attr->ia_valid;
  420. vnode_t *vp = LINVFS_GET_VP(inode);
  421. vattr_t vattr;
  422. int flags = 0;
  423. int error;
  424. memset(&vattr, 0, sizeof(vattr_t));
  425. if (ia_valid & ATTR_UID) {
  426. vattr.va_mask |= XFS_AT_UID;
  427. vattr.va_uid = attr->ia_uid;
  428. }
  429. if (ia_valid & ATTR_GID) {
  430. vattr.va_mask |= XFS_AT_GID;
  431. vattr.va_gid = attr->ia_gid;
  432. }
  433. if (ia_valid & ATTR_SIZE) {
  434. vattr.va_mask |= XFS_AT_SIZE;
  435. vattr.va_size = attr->ia_size;
  436. }
  437. if (ia_valid & ATTR_ATIME) {
  438. vattr.va_mask |= XFS_AT_ATIME;
  439. vattr.va_atime = attr->ia_atime;
  440. }
  441. if (ia_valid & ATTR_MTIME) {
  442. vattr.va_mask |= XFS_AT_MTIME;
  443. vattr.va_mtime = attr->ia_mtime;
  444. }
  445. if (ia_valid & ATTR_CTIME) {
  446. vattr.va_mask |= XFS_AT_CTIME;
  447. vattr.va_ctime = attr->ia_ctime;
  448. }
  449. if (ia_valid & ATTR_MODE) {
  450. vattr.va_mask |= XFS_AT_MODE;
  451. vattr.va_mode = attr->ia_mode;
  452. if (!in_group_p(inode->i_gid) && !capable(CAP_FSETID))
  453. inode->i_mode &= ~S_ISGID;
  454. }
  455. if (ia_valid & (ATTR_MTIME_SET | ATTR_ATIME_SET))
  456. flags |= ATTR_UTIME;
  457. #ifdef ATTR_NO_BLOCK
  458. if ((ia_valid & ATTR_NO_BLOCK))
  459. flags |= ATTR_NONBLOCK;
  460. #endif
  461. VOP_SETATTR(vp, &vattr, flags, NULL, error);
  462. if (error)
  463. return -error;
  464. vn_revalidate(vp);
  465. return error;
  466. }
  467. STATIC void
  468. linvfs_truncate(
  469. struct inode *inode)
  470. {
  471. block_truncate_page(inode->i_mapping, inode->i_size, linvfs_get_block);
  472. }
  473. STATIC int
  474. linvfs_setxattr(
  475. struct dentry *dentry,
  476. const char *name,
  477. const void *data,
  478. size_t size,
  479. int flags)
  480. {
  481. vnode_t *vp = LINVFS_GET_VP(dentry->d_inode);
  482. char *attr = (char *)name;
  483. attrnames_t *namesp;
  484. int xflags = 0;
  485. int error;
  486. namesp = attr_lookup_namespace(attr, attr_namespaces, ATTR_NAMECOUNT);
  487. if (!namesp)
  488. return -EOPNOTSUPP;
  489. attr += namesp->attr_namelen;
  490. error = namesp->attr_capable(vp, NULL);
  491. if (error)
  492. return error;
  493. /* Convert Linux syscall to XFS internal ATTR flags */
  494. if (flags & XATTR_CREATE)
  495. xflags |= ATTR_CREATE;
  496. if (flags & XATTR_REPLACE)
  497. xflags |= ATTR_REPLACE;
  498. xflags |= namesp->attr_flag;
  499. return namesp->attr_set(vp, attr, (void *)data, size, xflags);
  500. }
  501. STATIC ssize_t
  502. linvfs_getxattr(
  503. struct dentry *dentry,
  504. const char *name,
  505. void *data,
  506. size_t size)
  507. {
  508. vnode_t *vp = LINVFS_GET_VP(dentry->d_inode);
  509. char *attr = (char *)name;
  510. attrnames_t *namesp;
  511. int xflags = 0;
  512. ssize_t error;
  513. namesp = attr_lookup_namespace(attr, attr_namespaces, ATTR_NAMECOUNT);
  514. if (!namesp)
  515. return -EOPNOTSUPP;
  516. attr += namesp->attr_namelen;
  517. error = namesp->attr_capable(vp, NULL);
  518. if (error)
  519. return error;
  520. /* Convert Linux syscall to XFS internal ATTR flags */
  521. if (!size) {
  522. xflags |= ATTR_KERNOVAL;
  523. data = NULL;
  524. }
  525. xflags |= namesp->attr_flag;
  526. return namesp->attr_get(vp, attr, (void *)data, size, xflags);
  527. }
  528. STATIC ssize_t
  529. linvfs_listxattr(
  530. struct dentry *dentry,
  531. char *data,
  532. size_t size)
  533. {
  534. vnode_t *vp = LINVFS_GET_VP(dentry->d_inode);
  535. int error, xflags = ATTR_KERNAMELS;
  536. ssize_t result;
  537. if (!size)
  538. xflags |= ATTR_KERNOVAL;
  539. xflags |= capable(CAP_SYS_ADMIN) ? ATTR_KERNFULLS : ATTR_KERNORMALS;
  540. error = attr_generic_list(vp, data, size, xflags, &result);
  541. if (error < 0)
  542. return error;
  543. return result;
  544. }
  545. STATIC int
  546. linvfs_removexattr(
  547. struct dentry *dentry,
  548. const char *name)
  549. {
  550. vnode_t *vp = LINVFS_GET_VP(dentry->d_inode);
  551. char *attr = (char *)name;
  552. attrnames_t *namesp;
  553. int xflags = 0;
  554. int error;
  555. namesp = attr_lookup_namespace(attr, attr_namespaces, ATTR_NAMECOUNT);
  556. if (!namesp)
  557. return -EOPNOTSUPP;
  558. attr += namesp->attr_namelen;
  559. error = namesp->attr_capable(vp, NULL);
  560. if (error)
  561. return error;
  562. xflags |= namesp->attr_flag;
  563. return namesp->attr_remove(vp, attr, xflags);
  564. }
  565. struct inode_operations linvfs_file_inode_operations = {
  566. .permission = linvfs_permission,
  567. .truncate = linvfs_truncate,
  568. .getattr = linvfs_getattr,
  569. .setattr = linvfs_setattr,
  570. .setxattr = linvfs_setxattr,
  571. .getxattr = linvfs_getxattr,
  572. .listxattr = linvfs_listxattr,
  573. .removexattr = linvfs_removexattr,
  574. };
  575. struct inode_operations linvfs_dir_inode_operations = {
  576. .create = linvfs_create,
  577. .lookup = linvfs_lookup,
  578. .link = linvfs_link,
  579. .unlink = linvfs_unlink,
  580. .symlink = linvfs_symlink,
  581. .mkdir = linvfs_mkdir,
  582. .rmdir = linvfs_rmdir,
  583. .mknod = linvfs_mknod,
  584. .rename = linvfs_rename,
  585. .permission = linvfs_permission,
  586. .getattr = linvfs_getattr,
  587. .setattr = linvfs_setattr,
  588. .setxattr = linvfs_setxattr,
  589. .getxattr = linvfs_getxattr,
  590. .listxattr = linvfs_listxattr,
  591. .removexattr = linvfs_removexattr,
  592. };
  593. struct inode_operations linvfs_symlink_inode_operations = {
  594. .readlink = generic_readlink,
  595. .follow_link = linvfs_follow_link,
  596. .put_link = linvfs_put_link,
  597. .permission = linvfs_permission,
  598. .getattr = linvfs_getattr,
  599. .setattr = linvfs_setattr,
  600. .setxattr = linvfs_setxattr,
  601. .getxattr = linvfs_getxattr,
  602. .listxattr = linvfs_listxattr,
  603. .removexattr = linvfs_removexattr,
  604. };