2 * Copyright (C) 2005-2012 Junjiro R. Okajima
4 * This program, aufs is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
20 * inode operations (except add/del/rename)
23 #include <linux/device_cgroup.h>
24 #include <linux/fs_stack.h>
25 #include <linux/namei.h>
26 #include <linux/security.h>
29 static int h_permission(struct inode *h_inode, int mask,
30 struct vfsmount *h_mnt, int brperm)
33 const unsigned char write_mask = !!(mask & (MAY_WRITE | MAY_APPEND));
36 if ((write_mask && IS_IMMUTABLE(h_inode))
38 && S_ISREG(h_inode->i_mode)
39 && ((h_mnt->mnt_flags & MNT_NOEXEC)
40 || !(h_inode->i_mode & S_IXUGO))))
44 * - skip the lower fs test in the case of write to ro branch.
45 * - nfs dir permission write check is optimized, but a policy for
46 * link/rename requires a real check.
48 if ((write_mask && !au_br_writable(brperm))
49 || (au_test_nfs(h_inode->i_sb) && S_ISDIR(h_inode->i_mode)
50 && write_mask && !(mask & MAY_READ))
51 || !h_inode->i_op->permission) {
52 /* AuLabel(generic_permission); */
53 err = generic_permission(h_inode, mask);
55 /* AuLabel(h_inode->permission); */
56 err = h_inode->i_op->permission(h_inode, mask);
61 err = devcgroup_inode_permission(h_inode, mask);
63 err = security_inode_permission(h_inode, mask);
67 /* todo: do we need to call ima_path_check()? */
68 struct path h_path = {
72 err = ima_path_check(&h_path,
73 mask & (MAY_READ | MAY_WRITE | MAY_EXEC),
82 static int aufs_permission(struct inode *inode, int mask)
85 aufs_bindex_t bindex, bend;
86 const unsigned char isdir = !!S_ISDIR(inode->i_mode),
87 write_mask = !!(mask & (MAY_WRITE | MAY_APPEND));
88 struct inode *h_inode;
89 struct super_block *sb;
92 /* todo: support rcu-walk? */
93 if (mask & MAY_NOT_BLOCK)
97 si_read_lock(sb, AuLock_FLUSH);
98 ii_read_lock_child(inode);
100 err = au_iigen_test(inode, au_sigen(sb));
105 if (!isdir || write_mask) {
106 err = au_busy_or_stale();
107 h_inode = au_h_iptr(inode, au_ibstart(inode));
108 if (unlikely(!h_inode
109 || (h_inode->i_mode & S_IFMT)
110 != (inode->i_mode & S_IFMT)))
114 bindex = au_ibstart(inode);
115 br = au_sbr(sb, bindex);
116 err = h_permission(h_inode, mask, br->br_mnt, br->br_perm);
119 && !special_file(h_inode->i_mode)) {
120 /* test whether the upper writable branch exists */
122 for (; bindex >= 0; bindex--)
123 if (!au_br_rdonly(au_sbr(sb, bindex))) {
131 /* non-write to dir */
133 bend = au_ibend(inode);
134 for (bindex = au_ibstart(inode); !err && bindex <= bend; bindex++) {
135 h_inode = au_h_iptr(inode, bindex);
137 err = au_busy_or_stale();
138 if (unlikely(!S_ISDIR(h_inode->i_mode)))
141 br = au_sbr(sb, bindex);
142 err = h_permission(h_inode, mask, br->br_mnt,
148 ii_read_unlock(inode);
153 /* ---------------------------------------------------------------------- */
155 static struct dentry *aufs_lookup(struct inode *dir, struct dentry *dentry,
156 struct nameidata *nd)
158 struct dentry *ret, *parent;
160 struct super_block *sb;
161 int err, npositive, lc_idx;
166 err = si_read_lock(sb, AuLock_FLUSH | AuLock_NOPLM);
171 ret = ERR_PTR(-ENAMETOOLONG);
172 if (unlikely(dentry->d_name.len > AUFS_MAX_NAMELEN))
174 err = au_di_init(dentry);
180 npositive = 0; /* suppress a warning */
181 parent = dentry->d_parent; /* dir inode is locked */
182 di_read_lock_parent(parent, AuLock_IR);
183 err = au_alive_dir(parent);
185 err = au_digen_test(parent, au_sigen(sb));
187 npositive = au_lkup_dentry(dentry, au_dbstart(parent),
191 di_read_unlock(parent, AuLock_IR);
193 if (unlikely(err < 0))
197 inode = au_new_inode(dentry, /*must_new*/0);
205 ret = d_splice_alias(inode, dentry);
206 if (unlikely(IS_ERR(ret) && inode)) {
207 ii_write_unlock(inode);
208 lc_idx = AuLcNonDir_IIINFO;
209 if (S_ISLNK(inode->i_mode))
210 lc_idx = AuLcSymlink_IIINFO;
211 else if (S_ISDIR(inode->i_mode))
212 lc_idx = AuLcDir_IIINFO;
213 au_rw_class(&au_ii(inode)->ii_rwsem, au_lc_key + lc_idx);
218 di_write_unlock(dentry);
219 if (unlikely(IS_ERR(ret) && inode)) {
220 lc_idx = AuLcNonDir_DIINFO;
221 if (S_ISLNK(inode->i_mode))
222 lc_idx = AuLcSymlink_DIINFO;
223 else if (S_ISDIR(inode->i_mode))
224 lc_idx = AuLcDir_DIINFO;
225 au_rw_class(&au_di(dentry)->di_rwsem, au_lc_key + lc_idx);
233 /* ---------------------------------------------------------------------- */
235 static int au_wr_dir_cpup(struct dentry *dentry, struct dentry *parent,
236 const unsigned char add_entry, aufs_bindex_t bcpup,
237 aufs_bindex_t bstart)
240 struct dentry *h_parent;
244 IMustLock(parent->d_inode);
246 di_write_lock_parent(parent);
249 if (!au_h_dptr(parent, bcpup)) {
251 err = au_cpdown_dirs(dentry, bcpup);
253 err = au_cpup_dirs(dentry, bcpup);
255 if (!err && add_entry) {
256 h_parent = au_h_dptr(parent, bcpup);
257 h_dir = h_parent->d_inode;
258 mutex_lock_nested(&h_dir->i_mutex, AuLsc_I_PARENT);
259 err = au_lkup_neg(dentry, bcpup);
260 /* todo: no unlock here */
261 mutex_unlock(&h_dir->i_mutex);
263 AuDbg("bcpup %d\n", bcpup);
265 if (!dentry->d_inode)
266 au_set_h_dptr(dentry, bstart, NULL);
267 au_update_dbrange(dentry, /*do_put_zero*/0);
272 di_write_unlock(parent);
274 err = bcpup; /* success */
281 * decide the branch and the parent dir where we will create a new entry.
282 * returns new bindex or an error.
283 * copyup the parent dir if needed.
285 int au_wr_dir(struct dentry *dentry, struct dentry *src_dentry,
286 struct au_wr_dir_args *args)
289 aufs_bindex_t bcpup, bstart, src_bstart;
290 const unsigned char add_entry = !!au_ftest_wrdir(args->flags,
292 struct super_block *sb;
293 struct dentry *parent;
294 struct au_sbinfo *sbinfo;
298 parent = dget_parent(dentry);
299 bstart = au_dbstart(dentry);
301 if (args->force_btgt < 0) {
303 src_bstart = au_dbstart(src_dentry);
304 if (src_bstart < bstart)
306 } else if (add_entry) {
307 err = AuWbrCreate(sbinfo, dentry,
308 au_ftest_wrdir(args->flags, ISDIR));
312 if (bcpup < 0 || au_test_ro(sb, bcpup, dentry->d_inode)) {
314 err = AuWbrCopyup(sbinfo, dentry);
316 if (!IS_ROOT(dentry)) {
317 di_read_lock_parent(parent, !AuLock_IR);
318 err = AuWbrCopyup(sbinfo, dentry);
319 di_read_unlock(parent, !AuLock_IR);
321 err = AuWbrCopyup(sbinfo, dentry);
324 if (unlikely(err < 0))
328 bcpup = args->force_btgt;
329 AuDebugOn(au_test_ro(sb, bcpup, dentry->d_inode));
332 AuDbg("bstart %d, bcpup %d\n", bstart, bcpup);
335 goto out; /* success */
337 /* copyup the new parent into the branch we process */
338 err = au_wr_dir_cpup(dentry, parent, add_entry, bcpup, bstart);
340 if (!dentry->d_inode) {
341 au_set_h_dptr(dentry, bstart, NULL);
342 au_set_dbstart(dentry, bcpup);
343 au_set_dbend(dentry, bcpup);
345 AuDebugOn(add_entry && !au_h_dptr(dentry, bcpup));
353 /* ---------------------------------------------------------------------- */
355 struct dentry *au_pinned_h_parent(struct au_pin *pin)
357 if (pin && pin->parent)
358 return au_h_dptr(pin->parent, pin->bindex);
362 void au_unpin(struct au_pin *p)
364 if (p->h_mnt && au_ftest_pin(p->flags, MNT_WRITE))
365 mnt_drop_write(p->h_mnt);
369 au_hn_imtx_unlock(p->hdir);
370 if (!au_ftest_pin(p->flags, DI_LOCKED))
371 di_read_unlock(p->parent, AuLock_IR);
372 iput(p->hdir->hi_inode);
379 int au_do_pin(struct au_pin *p)
382 struct super_block *sb;
383 struct dentry *h_dentry, *h_parent;
384 struct au_branch *br;
388 sb = p->dentry->d_sb;
389 br = au_sbr(sb, p->bindex);
390 if (IS_ROOT(p->dentry)) {
391 if (au_ftest_pin(p->flags, MNT_WRITE)) {
392 p->h_mnt = br->br_mnt;
393 err = mnt_want_write(p->h_mnt);
395 au_fclr_pin(p->flags, MNT_WRITE);
403 if (p->bindex <= au_dbend(p->dentry))
404 h_dentry = au_h_dptr(p->dentry, p->bindex);
406 p->parent = dget_parent(p->dentry);
407 if (!au_ftest_pin(p->flags, DI_LOCKED))
408 di_read_lock(p->parent, AuLock_IR, p->lsc_di);
411 h_parent = au_h_dptr(p->parent, p->bindex);
412 p->hdir = au_hi(p->parent->d_inode, p->bindex);
414 h_dir = p->hdir->hi_inode;
418 * if DI_LOCKED is not set, then p->parent may be different
419 * and h_parent can be NULL.
421 if (unlikely(!p->hdir || !h_dir || !h_parent)) {
423 if (!au_ftest_pin(p->flags, DI_LOCKED))
424 di_read_unlock(p->parent, AuLock_IR);
431 au_hn_imtx_lock_nested(p->hdir, p->lsc_hi);
433 if (unlikely(p->hdir->hi_inode != h_parent->d_inode)) {
438 err = au_h_verify(h_dentry, p->udba, h_dir, h_parent, br);
440 au_fclr_pin(p->flags, MNT_WRITE);
445 if (au_ftest_pin(p->flags, MNT_WRITE)) {
446 p->h_mnt = br->br_mnt;
447 err = mnt_want_write(p->h_mnt);
449 au_fclr_pin(p->flags, MNT_WRITE);
453 goto out; /* success */
458 pr_err("err %d\n", err);
459 err = au_busy_or_stale();
464 void au_pin_init(struct au_pin *p, struct dentry *dentry,
465 aufs_bindex_t bindex, int lsc_di, int lsc_hi,
466 unsigned int udba, unsigned char flags)
480 int au_pin(struct au_pin *pin, struct dentry *dentry, aufs_bindex_t bindex,
481 unsigned int udba, unsigned char flags)
483 au_pin_init(pin, dentry, bindex, AuLsc_DI_PARENT, AuLsc_I_PARENT2,
485 return au_do_pin(pin);
488 /* ---------------------------------------------------------------------- */
491 * ->setattr() and ->getattr() are called in various cases.
492 * chmod, stat: dentry is revalidated.
493 * fchmod, fstat: file and dentry are not revalidated, additionally they may be
495 * for ->setattr(), ia->ia_file is passed from ftruncate only.
497 /* todo: consolidate with do_refresh() and simple_reval_dpath() */
498 static int au_reval_for_attr(struct dentry *dentry, unsigned int sigen)
502 struct dentry *parent;
505 inode = dentry->d_inode;
506 if (au_digen_test(dentry, sigen)) {
507 parent = dget_parent(dentry);
508 di_read_lock_parent(parent, AuLock_IR);
509 err = au_refresh_dentry(dentry, parent);
510 di_read_unlock(parent, AuLock_IR);
518 #define AuIcpup_DID_CPUP 1
519 #define au_ftest_icpup(flags, name) ((flags) & AuIcpup_##name)
520 #define au_fset_icpup(flags, name) \
521 do { (flags) |= AuIcpup_##name; } while (0)
522 #define au_fclr_icpup(flags, name) \
523 do { (flags) &= ~AuIcpup_##name; } while (0)
525 struct au_icpup_args {
527 unsigned char pin_flags;
532 struct inode *h_inode;
535 static int au_pin_and_icpup(struct dentry *dentry, struct iattr *ia,
536 struct au_icpup_args *a)
540 aufs_bindex_t bstart, ibstart;
541 struct dentry *hi_wh, *parent;
544 struct au_wr_dir_args wr_dir_args = {
549 bstart = au_dbstart(dentry);
550 inode = dentry->d_inode;
551 if (S_ISDIR(inode->i_mode))
552 au_fset_wrdir(wr_dir_args.flags, ISDIR);
553 /* plink or hi_wh() case */
554 ibstart = au_ibstart(inode);
555 if (bstart != ibstart && !au_test_ro(inode->i_sb, ibstart, inode))
556 wr_dir_args.force_btgt = ibstart;
557 err = au_wr_dir(dentry, /*src_dentry*/NULL, &wr_dir_args);
558 if (unlikely(err < 0))
562 au_fset_icpup(a->flags, DID_CPUP);
565 a->pin_flags = AuPin_MNT_WRITE;
567 if (!IS_ROOT(dentry)) {
568 au_fset_pin(a->pin_flags, DI_LOCKED);
569 parent = dget_parent(dentry);
570 di_write_lock_parent(parent);
573 err = au_pin(&a->pin, dentry, a->btgt, a->udba, a->pin_flags);
577 a->h_path.dentry = au_h_dptr(dentry, bstart);
578 a->h_inode = a->h_path.dentry->d_inode;
579 mutex_lock_nested(&a->h_inode->i_mutex, AuLsc_I_CHILD);
581 if ((ia->ia_valid & ATTR_SIZE) && ia->ia_size < i_size_read(a->h_inode))
586 if (au_ftest_icpup(a->flags, DID_CPUP) && d_unlinked(dentry)) {
587 hi_wh = au_hi_wh(inode, a->btgt);
589 err = au_sio_cpup_wh(dentry, a->btgt, sz, /*file*/NULL);
592 hi_wh = au_hi_wh(inode, a->btgt);
593 /* todo: revalidate hi_wh? */
598 au_pin_set_parent_lflag(&a->pin, /*lflag*/0);
599 di_downgrade_lock(parent, AuLock_IR);
603 if (!au_ftest_icpup(a->flags, DID_CPUP))
604 goto out; /* success */
606 if (!d_unhashed(dentry)) {
607 h_file = au_h_open_pre(dentry, bstart);
608 if (IS_ERR(h_file)) {
609 err = PTR_ERR(h_file);
612 err = au_sio_cpup_simple(dentry, a->btgt, sz,
615 a->h_path.dentry = au_h_dptr(dentry, a->btgt);
617 a->h_path.dentry = au_h_dptr(dentry, a->btgt);
619 a->h_path.dentry = hi_wh; /* do not dget here */
622 mutex_unlock(&a->h_inode->i_mutex);
623 au_h_open_post(dentry, bstart, h_file);
624 a->h_inode = a->h_path.dentry->d_inode;
626 mutex_lock_nested(&a->h_inode->i_mutex, AuLsc_I_CHILD);
627 goto out; /* success */
633 di_write_unlock(parent);
640 static int aufs_setattr(struct dentry *dentry, struct iattr *ia)
644 struct super_block *sb;
646 struct au_icpup_args *a;
648 inode = dentry->d_inode;
652 a = kzalloc(sizeof(*a), GFP_NOFS);
656 if (ia->ia_valid & (ATTR_KILL_SUID | ATTR_KILL_SGID))
657 ia->ia_valid &= ~ATTR_MODE;
661 err = si_read_lock(sb, AuLock_FLUSH | AuLock_NOPLM);
665 if (ia->ia_valid & ATTR_FILE) {
666 /* currently ftruncate(2) only */
667 AuDebugOn(!S_ISREG(inode->i_mode));
669 err = au_reval_and_lock_fdi(file, au_reopen_nondir, /*wlock*/1);
672 ia->ia_file = au_hf_top(file);
673 a->udba = AuOpt_UDBA_NONE;
675 /* fchmod() doesn't pass ia_file */
676 a->udba = au_opt_udba(sb);
677 di_write_lock_child(dentry);
678 /* no d_unlinked(), to set UDBA_NONE for root */
679 if (d_unhashed(dentry))
680 a->udba = AuOpt_UDBA_NONE;
681 if (a->udba != AuOpt_UDBA_NONE) {
682 AuDebugOn(IS_ROOT(dentry));
683 err = au_reval_for_attr(dentry, au_sigen(sb));
689 err = au_pin_and_icpup(dentry, ia, a);
690 if (unlikely(err < 0))
692 if (au_ftest_icpup(a->flags, DID_CPUP)) {
694 ia->ia_valid &= ~ATTR_FILE;
697 a->h_path.mnt = au_sbr_mnt(sb, a->btgt);
698 if ((ia->ia_valid & (ATTR_MODE | ATTR_CTIME))
699 == (ATTR_MODE | ATTR_CTIME)) {
700 err = security_path_chmod(a->h_path.dentry, a->h_path.mnt,
704 } else if ((ia->ia_valid & (ATTR_UID | ATTR_GID))
705 && (ia->ia_valid & ATTR_CTIME)) {
706 err = security_path_chown(&a->h_path, ia->ia_uid, ia->ia_gid);
711 if (ia->ia_valid & ATTR_SIZE) {
714 if (ia->ia_size < i_size_read(inode))
716 truncate_setsize(inode, ia->ia_size);
719 if (ia->ia_valid & ATTR_FILE)
721 mutex_unlock(&a->h_inode->i_mutex);
722 err = vfsub_trunc(&a->h_path, ia->ia_size, ia->ia_valid, f);
723 mutex_lock_nested(&a->h_inode->i_mutex, AuLsc_I_CHILD);
725 err = vfsub_notify_change(&a->h_path, ia);
727 au_cpup_attr_changeable(inode);
730 mutex_unlock(&a->h_inode->i_mutex);
733 au_update_dbstart(dentry);
735 di_write_unlock(dentry);
737 fi_write_unlock(file);
739 ia->ia_valid |= ATTR_FILE;
750 static void au_refresh_iattr(struct inode *inode, struct kstat *st,
755 inode->i_mode = st->mode;
756 inode->i_uid = st->uid;
757 inode->i_gid = st->gid;
758 inode->i_atime = st->atime;
759 inode->i_mtime = st->mtime;
760 inode->i_ctime = st->ctime;
762 au_cpup_attr_nlink(inode, /*force*/0);
763 if (S_ISDIR(inode->i_mode)) {
770 spin_lock(&inode->i_lock);
771 inode->i_blocks = st->blocks;
772 i_size_write(inode, st->size);
773 spin_unlock(&inode->i_lock);
776 static int aufs_getattr(struct vfsmount *mnt __maybe_unused,
777 struct dentry *dentry, struct kstat *st)
780 unsigned int mnt_flags;
781 aufs_bindex_t bindex;
782 unsigned char udba_none, positive;
783 struct super_block *sb, *h_sb;
785 struct vfsmount *h_mnt;
786 struct dentry *h_dentry;
789 inode = dentry->d_inode;
790 err = si_read_lock(sb, AuLock_FLUSH | AuLock_NOPLM);
793 mnt_flags = au_mntflags(sb);
794 udba_none = !!au_opt_test(mnt_flags, UDBA_NONE);
796 /* support fstat(2) */
797 if (!d_unlinked(dentry) && !udba_none) {
798 unsigned int sigen = au_sigen(sb);
799 err = au_digen_test(dentry, sigen);
801 di_read_lock_child(dentry, AuLock_IR);
802 err = au_dbrange_test(dentry);
806 AuDebugOn(IS_ROOT(dentry));
807 di_write_lock_child(dentry);
808 err = au_dbrange_test(dentry);
810 err = au_reval_for_attr(dentry, sigen);
811 di_downgrade_lock(dentry, AuLock_IR);
816 di_read_lock_child(dentry, AuLock_IR);
818 bindex = au_ibstart(inode);
819 h_mnt = au_sbr_mnt(sb, bindex);
820 h_sb = h_mnt->mnt_sb;
821 if (!au_test_fs_bad_iattr(h_sb) && udba_none)
822 goto out_fill; /* success */
825 if (au_dbstart(dentry) == bindex)
826 h_dentry = dget(au_h_dptr(dentry, bindex));
827 else if (au_opt_test(mnt_flags, PLINK) && au_plink_test(inode)) {
828 h_dentry = au_plink_lkup(inode, bindex);
829 if (IS_ERR(h_dentry))
830 goto out_fill; /* pretending success */
832 /* illegally overlapped or something */
833 if (unlikely(!h_dentry))
834 goto out_fill; /* pretending success */
836 positive = !!h_dentry->d_inode;
838 err = vfs_getattr(h_mnt, h_dentry, st);
842 au_refresh_iattr(inode, st, h_dentry->d_inode->i_nlink);
843 goto out_fill; /* success */
849 generic_fillattr(inode, st);
851 di_read_unlock(dentry, AuLock_IR);
858 /* ---------------------------------------------------------------------- */
860 static int h_readlink(struct dentry *dentry, int bindex, char __user *buf,
864 struct super_block *sb;
865 struct dentry *h_dentry;
868 h_dentry = au_h_dptr(dentry, bindex);
869 if (unlikely(!h_dentry->d_inode->i_op->readlink))
872 err = security_inode_readlink(h_dentry);
877 if (!au_test_ro(sb, bindex, dentry->d_inode)) {
878 vfsub_touch_atime(au_sbr_mnt(sb, bindex), h_dentry);
879 fsstack_copy_attr_atime(dentry->d_inode, h_dentry->d_inode);
881 err = h_dentry->d_inode->i_op->readlink(h_dentry, buf, bufsiz);
887 static int aufs_readlink(struct dentry *dentry, char __user *buf, int bufsiz)
891 err = aufs_read_lock(dentry, AuLock_IR | AuLock_GEN);
894 err = au_d_hashed_positive(dentry);
896 err = h_readlink(dentry, au_dbstart(dentry), buf, bufsiz);
897 aufs_read_unlock(dentry, AuLock_IR);
903 static void *aufs_follow_link(struct dentry *dentry, struct nameidata *nd)
913 buf.k = __getname_gfp(GFP_NOFS);
914 if (unlikely(!buf.k))
917 err = aufs_read_lock(dentry, AuLock_IR | AuLock_GEN);
921 err = au_d_hashed_positive(dentry);
925 err = h_readlink(dentry, au_dbstart(dentry), buf.u, PATH_MAX);
928 aufs_read_unlock(dentry, AuLock_IR);
932 /* will be freed by put_link */
933 nd_set_link(nd, buf.k);
934 return NULL; /* success */
945 static void aufs_put_link(struct dentry *dentry __maybe_unused,
946 struct nameidata *nd, void *cookie __maybe_unused)
948 __putname(nd_get_link(nd));
951 /* ---------------------------------------------------------------------- */
953 static void aufs_truncate_range(struct inode *inode __maybe_unused,
954 loff_t start __maybe_unused,
955 loff_t end __maybe_unused)
960 /* ---------------------------------------------------------------------- */
962 struct inode_operations aufs_symlink_iop = {
963 .permission = aufs_permission,
964 .setattr = aufs_setattr,
965 .getattr = aufs_getattr,
966 .readlink = aufs_readlink,
967 .follow_link = aufs_follow_link,
968 .put_link = aufs_put_link
971 struct inode_operations aufs_dir_iop = {
972 .create = aufs_create,
973 .lookup = aufs_lookup,
975 .unlink = aufs_unlink,
976 .symlink = aufs_symlink,
980 .rename = aufs_rename,
982 .permission = aufs_permission,
983 .setattr = aufs_setattr,
984 .getattr = aufs_getattr
987 struct inode_operations aufs_iop = {
988 .permission = aufs_permission,
989 .setattr = aufs_setattr,
990 .getattr = aufs_getattr,
991 .truncate_range = aufs_truncate_range