xfs_iops.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680
  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_type = IFTOVT(mode);
  132. va.va_mode = mode;
  133. switch (mode & S_IFMT) {
  134. case S_IFCHR: case S_IFBLK: case S_IFIFO: case S_IFSOCK:
  135. va.va_rdev = sysv_encode_dev(rdev);
  136. va.va_mask |= XFS_AT_RDEV;
  137. /*FALLTHROUGH*/
  138. case S_IFREG:
  139. VOP_CREATE(dvp, dentry, &va, &vp, NULL, error);
  140. break;
  141. case S_IFDIR:
  142. VOP_MKDIR(dvp, dentry, &va, &vp, NULL, error);
  143. break;
  144. default:
  145. error = EINVAL;
  146. break;
  147. }
  148. if (default_acl) {
  149. if (!error) {
  150. error = _ACL_INHERIT(vp, &va, default_acl);
  151. if (!error) {
  152. VMODIFY(vp);
  153. } else {
  154. struct dentry teardown = {};
  155. int err2;
  156. /* Oh, the horror.
  157. * If we can't add the ACL we must back out.
  158. * ENOSPC can hit here, among other things.
  159. */
  160. teardown.d_inode = ip = LINVFS_GET_IP(vp);
  161. teardown.d_name = dentry->d_name;
  162. vn_mark_bad(vp);
  163. if (S_ISDIR(mode))
  164. VOP_RMDIR(dvp, &teardown, NULL, err2);
  165. else
  166. VOP_REMOVE(dvp, &teardown, NULL, err2);
  167. VN_RELE(vp);
  168. }
  169. }
  170. _ACL_FREE(default_acl);
  171. }
  172. if (!error) {
  173. ASSERT(vp);
  174. ip = LINVFS_GET_IP(vp);
  175. if (S_ISCHR(mode) || S_ISBLK(mode))
  176. ip->i_rdev = rdev;
  177. else if (S_ISDIR(mode))
  178. validate_fields(ip);
  179. d_instantiate(dentry, ip);
  180. validate_fields(dir);
  181. }
  182. return -error;
  183. }
  184. STATIC int
  185. linvfs_create(
  186. struct inode *dir,
  187. struct dentry *dentry,
  188. int mode,
  189. struct nameidata *nd)
  190. {
  191. return linvfs_mknod(dir, dentry, mode, 0);
  192. }
  193. STATIC int
  194. linvfs_mkdir(
  195. struct inode *dir,
  196. struct dentry *dentry,
  197. int mode)
  198. {
  199. return linvfs_mknod(dir, dentry, mode|S_IFDIR, 0);
  200. }
  201. STATIC struct dentry *
  202. linvfs_lookup(
  203. struct inode *dir,
  204. struct dentry *dentry,
  205. struct nameidata *nd)
  206. {
  207. struct vnode *vp = LINVFS_GET_VP(dir), *cvp;
  208. int error;
  209. if (dentry->d_name.len >= MAXNAMELEN)
  210. return ERR_PTR(-ENAMETOOLONG);
  211. VOP_LOOKUP(vp, dentry, &cvp, 0, NULL, NULL, error);
  212. if (error) {
  213. if (unlikely(error != ENOENT))
  214. return ERR_PTR(-error);
  215. d_add(dentry, NULL);
  216. return NULL;
  217. }
  218. return d_splice_alias(LINVFS_GET_IP(cvp), dentry);
  219. }
  220. STATIC int
  221. linvfs_link(
  222. struct dentry *old_dentry,
  223. struct inode *dir,
  224. struct dentry *dentry)
  225. {
  226. struct inode *ip; /* inode of guy being linked to */
  227. vnode_t *tdvp; /* target directory for new name/link */
  228. vnode_t *vp; /* vp of name being linked */
  229. int error;
  230. ip = old_dentry->d_inode; /* inode being linked to */
  231. if (S_ISDIR(ip->i_mode))
  232. return -EPERM;
  233. tdvp = LINVFS_GET_VP(dir);
  234. vp = LINVFS_GET_VP(ip);
  235. VOP_LINK(tdvp, vp, dentry, NULL, error);
  236. if (!error) {
  237. VMODIFY(tdvp);
  238. VN_HOLD(vp);
  239. validate_fields(ip);
  240. d_instantiate(dentry, ip);
  241. }
  242. return -error;
  243. }
  244. STATIC int
  245. linvfs_unlink(
  246. struct inode *dir,
  247. struct dentry *dentry)
  248. {
  249. struct inode *inode;
  250. vnode_t *dvp; /* directory containing name to remove */
  251. int error;
  252. inode = dentry->d_inode;
  253. dvp = LINVFS_GET_VP(dir);
  254. VOP_REMOVE(dvp, dentry, NULL, error);
  255. if (!error) {
  256. validate_fields(dir); /* For size only */
  257. validate_fields(inode);
  258. }
  259. return -error;
  260. }
  261. STATIC int
  262. linvfs_symlink(
  263. struct inode *dir,
  264. struct dentry *dentry,
  265. const char *symname)
  266. {
  267. struct inode *ip;
  268. vattr_t va;
  269. vnode_t *dvp; /* directory containing name of symlink */
  270. vnode_t *cvp; /* used to lookup symlink to put in dentry */
  271. int error;
  272. dvp = LINVFS_GET_VP(dir);
  273. cvp = NULL;
  274. memset(&va, 0, sizeof(va));
  275. va.va_type = VLNK;
  276. va.va_mode = irix_symlink_mode ? 0777 & ~current->fs->umask : S_IRWXUGO;
  277. va.va_mask = XFS_AT_TYPE|XFS_AT_MODE;
  278. error = 0;
  279. VOP_SYMLINK(dvp, dentry, &va, (char *)symname, &cvp, NULL, error);
  280. if (!error && cvp) {
  281. ASSERT(cvp->v_type == VLNK);
  282. ip = LINVFS_GET_IP(cvp);
  283. d_instantiate(dentry, ip);
  284. validate_fields(dir);
  285. validate_fields(ip); /* size needs update */
  286. }
  287. return -error;
  288. }
  289. STATIC int
  290. linvfs_rmdir(
  291. struct inode *dir,
  292. struct dentry *dentry)
  293. {
  294. struct inode *inode = dentry->d_inode;
  295. vnode_t *dvp = LINVFS_GET_VP(dir);
  296. int error;
  297. VOP_RMDIR(dvp, dentry, NULL, error);
  298. if (!error) {
  299. validate_fields(inode);
  300. validate_fields(dir);
  301. }
  302. return -error;
  303. }
  304. STATIC int
  305. linvfs_rename(
  306. struct inode *odir,
  307. struct dentry *odentry,
  308. struct inode *ndir,
  309. struct dentry *ndentry)
  310. {
  311. struct inode *new_inode = ndentry->d_inode;
  312. vnode_t *fvp; /* from directory */
  313. vnode_t *tvp; /* target directory */
  314. int error;
  315. fvp = LINVFS_GET_VP(odir);
  316. tvp = LINVFS_GET_VP(ndir);
  317. VOP_RENAME(fvp, odentry, tvp, ndentry, NULL, error);
  318. if (error)
  319. return -error;
  320. if (new_inode)
  321. validate_fields(new_inode);
  322. validate_fields(odir);
  323. if (ndir != odir)
  324. validate_fields(ndir);
  325. return 0;
  326. }
  327. /*
  328. * careful here - this function can get called recursively, so
  329. * we need to be very careful about how much stack we use.
  330. * uio is kmalloced for this reason...
  331. */
  332. STATIC int
  333. linvfs_follow_link(
  334. struct dentry *dentry,
  335. struct nameidata *nd)
  336. {
  337. vnode_t *vp;
  338. uio_t *uio;
  339. iovec_t iov;
  340. int error;
  341. char *link;
  342. ASSERT(dentry);
  343. ASSERT(nd);
  344. link = (char *)kmalloc(MAXNAMELEN+1, GFP_KERNEL);
  345. if (!link) {
  346. nd_set_link(nd, ERR_PTR(-ENOMEM));
  347. return 0;
  348. }
  349. uio = (uio_t *)kmalloc(sizeof(uio_t), GFP_KERNEL);
  350. if (!uio) {
  351. kfree(link);
  352. nd_set_link(nd, ERR_PTR(-ENOMEM));
  353. return 0;
  354. }
  355. vp = LINVFS_GET_VP(dentry->d_inode);
  356. iov.iov_base = link;
  357. iov.iov_len = MAXNAMELEN;
  358. uio->uio_iov = &iov;
  359. uio->uio_offset = 0;
  360. uio->uio_segflg = UIO_SYSSPACE;
  361. uio->uio_resid = MAXNAMELEN;
  362. uio->uio_iovcnt = 1;
  363. VOP_READLINK(vp, uio, 0, NULL, error);
  364. if (error) {
  365. kfree(link);
  366. link = ERR_PTR(-error);
  367. } else {
  368. link[MAXNAMELEN - uio->uio_resid] = '\0';
  369. }
  370. kfree(uio);
  371. nd_set_link(nd, link);
  372. return 0;
  373. }
  374. static void linvfs_put_link(struct dentry *dentry, struct nameidata *nd)
  375. {
  376. char *s = nd_get_link(nd);
  377. if (!IS_ERR(s))
  378. kfree(s);
  379. }
  380. #ifdef CONFIG_XFS_POSIX_ACL
  381. STATIC int
  382. linvfs_permission(
  383. struct inode *inode,
  384. int mode,
  385. struct nameidata *nd)
  386. {
  387. vnode_t *vp = LINVFS_GET_VP(inode);
  388. int error;
  389. mode <<= 6; /* convert from linux to vnode access bits */
  390. VOP_ACCESS(vp, mode, NULL, error);
  391. return -error;
  392. }
  393. #else
  394. #define linvfs_permission NULL
  395. #endif
  396. STATIC int
  397. linvfs_getattr(
  398. struct vfsmount *mnt,
  399. struct dentry *dentry,
  400. struct kstat *stat)
  401. {
  402. struct inode *inode = dentry->d_inode;
  403. vnode_t *vp = LINVFS_GET_VP(inode);
  404. int error = 0;
  405. if (unlikely(vp->v_flag & VMODIFIED))
  406. error = vn_revalidate(vp);
  407. if (!error)
  408. generic_fillattr(inode, stat);
  409. return 0;
  410. }
  411. STATIC int
  412. linvfs_setattr(
  413. struct dentry *dentry,
  414. struct iattr *attr)
  415. {
  416. struct inode *inode = dentry->d_inode;
  417. unsigned int ia_valid = attr->ia_valid;
  418. vnode_t *vp = LINVFS_GET_VP(inode);
  419. vattr_t vattr;
  420. int flags = 0;
  421. int error;
  422. memset(&vattr, 0, sizeof(vattr_t));
  423. if (ia_valid & ATTR_UID) {
  424. vattr.va_mask |= XFS_AT_UID;
  425. vattr.va_uid = attr->ia_uid;
  426. }
  427. if (ia_valid & ATTR_GID) {
  428. vattr.va_mask |= XFS_AT_GID;
  429. vattr.va_gid = attr->ia_gid;
  430. }
  431. if (ia_valid & ATTR_SIZE) {
  432. vattr.va_mask |= XFS_AT_SIZE;
  433. vattr.va_size = attr->ia_size;
  434. }
  435. if (ia_valid & ATTR_ATIME) {
  436. vattr.va_mask |= XFS_AT_ATIME;
  437. vattr.va_atime = attr->ia_atime;
  438. }
  439. if (ia_valid & ATTR_MTIME) {
  440. vattr.va_mask |= XFS_AT_MTIME;
  441. vattr.va_mtime = attr->ia_mtime;
  442. }
  443. if (ia_valid & ATTR_CTIME) {
  444. vattr.va_mask |= XFS_AT_CTIME;
  445. vattr.va_ctime = attr->ia_ctime;
  446. }
  447. if (ia_valid & ATTR_MODE) {
  448. vattr.va_mask |= XFS_AT_MODE;
  449. vattr.va_mode = attr->ia_mode;
  450. if (!in_group_p(inode->i_gid) && !capable(CAP_FSETID))
  451. inode->i_mode &= ~S_ISGID;
  452. }
  453. if (ia_valid & (ATTR_MTIME_SET | ATTR_ATIME_SET))
  454. flags |= ATTR_UTIME;
  455. #ifdef ATTR_NO_BLOCK
  456. if ((ia_valid & ATTR_NO_BLOCK))
  457. flags |= ATTR_NONBLOCK;
  458. #endif
  459. VOP_SETATTR(vp, &vattr, flags, NULL, error);
  460. if (error)
  461. return -error;
  462. vn_revalidate(vp);
  463. return error;
  464. }
  465. STATIC void
  466. linvfs_truncate(
  467. struct inode *inode)
  468. {
  469. block_truncate_page(inode->i_mapping, inode->i_size, linvfs_get_block);
  470. }
  471. STATIC int
  472. linvfs_setxattr(
  473. struct dentry *dentry,
  474. const char *name,
  475. const void *data,
  476. size_t size,
  477. int flags)
  478. {
  479. vnode_t *vp = LINVFS_GET_VP(dentry->d_inode);
  480. char *attr = (char *)name;
  481. attrnames_t *namesp;
  482. int xflags = 0;
  483. int error;
  484. namesp = attr_lookup_namespace(attr, attr_namespaces, ATTR_NAMECOUNT);
  485. if (!namesp)
  486. return -EOPNOTSUPP;
  487. attr += namesp->attr_namelen;
  488. error = namesp->attr_capable(vp, NULL);
  489. if (error)
  490. return error;
  491. /* Convert Linux syscall to XFS internal ATTR flags */
  492. if (flags & XATTR_CREATE)
  493. xflags |= ATTR_CREATE;
  494. if (flags & XATTR_REPLACE)
  495. xflags |= ATTR_REPLACE;
  496. xflags |= namesp->attr_flag;
  497. return namesp->attr_set(vp, attr, (void *)data, size, xflags);
  498. }
  499. STATIC ssize_t
  500. linvfs_getxattr(
  501. struct dentry *dentry,
  502. const char *name,
  503. void *data,
  504. size_t size)
  505. {
  506. vnode_t *vp = LINVFS_GET_VP(dentry->d_inode);
  507. char *attr = (char *)name;
  508. attrnames_t *namesp;
  509. int xflags = 0;
  510. ssize_t error;
  511. namesp = attr_lookup_namespace(attr, attr_namespaces, ATTR_NAMECOUNT);
  512. if (!namesp)
  513. return -EOPNOTSUPP;
  514. attr += namesp->attr_namelen;
  515. error = namesp->attr_capable(vp, NULL);
  516. if (error)
  517. return error;
  518. /* Convert Linux syscall to XFS internal ATTR flags */
  519. if (!size) {
  520. xflags |= ATTR_KERNOVAL;
  521. data = NULL;
  522. }
  523. xflags |= namesp->attr_flag;
  524. return namesp->attr_get(vp, attr, (void *)data, size, xflags);
  525. }
  526. STATIC ssize_t
  527. linvfs_listxattr(
  528. struct dentry *dentry,
  529. char *data,
  530. size_t size)
  531. {
  532. vnode_t *vp = LINVFS_GET_VP(dentry->d_inode);
  533. int error, xflags = ATTR_KERNAMELS;
  534. ssize_t result;
  535. if (!size)
  536. xflags |= ATTR_KERNOVAL;
  537. xflags |= capable(CAP_SYS_ADMIN) ? ATTR_KERNFULLS : ATTR_KERNORMALS;
  538. error = attr_generic_list(vp, data, size, xflags, &result);
  539. if (error < 0)
  540. return error;
  541. return result;
  542. }
  543. STATIC int
  544. linvfs_removexattr(
  545. struct dentry *dentry,
  546. const char *name)
  547. {
  548. vnode_t *vp = LINVFS_GET_VP(dentry->d_inode);
  549. char *attr = (char *)name;
  550. attrnames_t *namesp;
  551. int xflags = 0;
  552. int error;
  553. namesp = attr_lookup_namespace(attr, attr_namespaces, ATTR_NAMECOUNT);
  554. if (!namesp)
  555. return -EOPNOTSUPP;
  556. attr += namesp->attr_namelen;
  557. error = namesp->attr_capable(vp, NULL);
  558. if (error)
  559. return error;
  560. xflags |= namesp->attr_flag;
  561. return namesp->attr_remove(vp, attr, xflags);
  562. }
  563. struct inode_operations linvfs_file_inode_operations = {
  564. .permission = linvfs_permission,
  565. .truncate = linvfs_truncate,
  566. .getattr = linvfs_getattr,
  567. .setattr = linvfs_setattr,
  568. .setxattr = linvfs_setxattr,
  569. .getxattr = linvfs_getxattr,
  570. .listxattr = linvfs_listxattr,
  571. .removexattr = linvfs_removexattr,
  572. };
  573. struct inode_operations linvfs_dir_inode_operations = {
  574. .create = linvfs_create,
  575. .lookup = linvfs_lookup,
  576. .link = linvfs_link,
  577. .unlink = linvfs_unlink,
  578. .symlink = linvfs_symlink,
  579. .mkdir = linvfs_mkdir,
  580. .rmdir = linvfs_rmdir,
  581. .mknod = linvfs_mknod,
  582. .rename = linvfs_rename,
  583. .permission = linvfs_permission,
  584. .getattr = linvfs_getattr,
  585. .setattr = linvfs_setattr,
  586. .setxattr = linvfs_setxattr,
  587. .getxattr = linvfs_getxattr,
  588. .listxattr = linvfs_listxattr,
  589. .removexattr = linvfs_removexattr,
  590. };
  591. struct inode_operations linvfs_symlink_inode_operations = {
  592. .readlink = generic_readlink,
  593. .follow_link = linvfs_follow_link,
  594. .put_link = linvfs_put_link,
  595. .permission = linvfs_permission,
  596. .getattr = linvfs_getattr,
  597. .setattr = linvfs_setattr,
  598. .setxattr = linvfs_setxattr,
  599. .getxattr = linvfs_getxattr,
  600. .listxattr = linvfs_listxattr,
  601. .removexattr = linvfs_removexattr,
  602. };