Fixed the AUFS patch for the kernel 4.11

This commit is contained in:
Evgenii Shatokhin 2017-06-04 18:49:11 +03:00
parent c3fbc1a79e
commit cf8d6820a4

View file

@ -3953,7 +3953,7 @@ index 0000000..0bbb2d3
+-include ${srctree}/${src}/conf_priv.mk
diff --git a/fs/aufs/cpup.c b/fs/aufs/cpup.c
new file mode 100644
index 0000000..f5ca12b
index 0000000..87ae97f0
--- /dev/null
+++ b/fs/aufs/cpup.c
@@ -0,0 +1,1407 @@
@ -4439,10 +4439,10 @@ index 0000000..f5ca12b
+ h_path.mnt = au_sbr_mnt(cpg->dentry->d_sb, cpg->bsrc);
+ h_src_attr->iflags = h_src_inode->i_flags;
+ if (!au_test_nfs(h_src_inode->i_sb))
+ err = vfs_getattr(&h_path, &h_src_attr->st);
+ err = vfsub_getattr(&h_path, &h_src_attr->st);
+ else {
+ inode_unlock(h_src_inode);
+ err = vfs_getattr(&h_path, &h_src_attr->st);
+ err = vfsub_getattr(&h_path, &h_src_attr->st);
+ inode_lock_nested(h_src_inode, AuLsc_I_CHILD);
+ }
+ if (unlikely(err)) {
@ -5466,7 +5466,7 @@ index 0000000..9c20116
+#endif /* __AUFS_CPUP_H__ */
diff --git a/fs/aufs/dbgaufs.c b/fs/aufs/dbgaufs.c
new file mode 100644
index 0000000..30913f4
index 0000000..97a4950
--- /dev/null
+++ b/fs/aufs/dbgaufs.c
@@ -0,0 +1,438 @@
@ -5534,7 +5534,7 @@ index 0000000..30913f4
+ if (!xf)
+ goto out;
+
+ err = vfs_getattr(&xf->f_path, &st);
+ err = vfsub_getattr(&xf->f_path, &st);
+ if (!err) {
+ if (do_fcnt)
+ p->n = snprintf
@ -15254,10 +15254,10 @@ index 0000000..773a1d2
+}
diff --git a/fs/aufs/i_op.c b/fs/aufs/i_op.c
new file mode 100644
index 0000000..c2a7cbe
index 0000000..bfd2df9
--- /dev/null
+++ b/fs/aufs/i_op.c
@@ -0,0 +1,1449 @@
@@ -0,0 +1,1452 @@
+/*
+ * Copyright (C) 2005-2017 Junjiro R. Okajima
+ *
@ -16466,15 +16466,17 @@ index 0000000..c2a7cbe
+ return err;
+}
+
+static int aufs_getattr(struct vfsmount *mnt __maybe_unused,
+ struct dentry *dentry, struct kstat *st)
+static int aufs_getattr(const struct path *path, struct kstat *st,
+ u32 request, unsigned int query)
+{
+ int err;
+ unsigned char positive;
+ struct path h_path;
+ struct dentry *dentry;
+ struct inode *inode;
+ struct super_block *sb;
+
+ dentry = path->dentry;
+ inode = d_inode(dentry);
+ sb = dentry->d_sb;
+ err = si_read_lock(sb, AuLock_FLUSH | AuLock_NOPLM);
@ -16489,7 +16491,8 @@ index 0000000..c2a7cbe
+
+ positive = d_is_positive(h_path.dentry);
+ if (positive)
+ err = vfs_getattr(&h_path, st);
+ /* no vfsub version */
+ err = vfs_getattr(&h_path, st, request, query);
+ if (!err) {
+ if (positive)
+ au_refresh_iattr(inode, st,
@ -29699,7 +29702,7 @@ index 0000000..b7583e9
+}
diff --git a/fs/aufs/vfsub.c b/fs/aufs/vfsub.c
new file mode 100644
index 0000000..3cf429c
index 0000000..2bdaf5c
--- /dev/null
+++ b/fs/aufs/vfsub.c
@@ -0,0 +1,899 @@
@ -29777,7 +29780,7 @@ index 0000000..3cf429c
+ h_sb = h_path->dentry->d_sb;
+ *did = (!au_test_fs_remote(h_sb) && au_test_fs_refresh_iattr(h_sb));
+ if (*did)
+ err = vfs_getattr(h_path, &st);
+ err = vfsub_getattr(h_path, &st);
+
+ return err;
+}
@ -30604,10 +30607,10 @@ index 0000000..3cf429c
+}
diff --git a/fs/aufs/vfsub.h b/fs/aufs/vfsub.h
new file mode 100644
index 0000000..aeb5891
index 0000000..2216871
--- /dev/null
+++ b/fs/aufs/vfsub.h
@@ -0,0 +1,348 @@
@@ -0,0 +1,353 @@
+/*
+ * Copyright (C) 2005-2017 Junjiro R. Okajima
+ *
@ -30929,6 +30932,11 @@ index 0000000..aeb5891
+int vfsub_unlink(struct inode *dir, struct path *path,
+ struct inode **delegated_inode, int force);
+
+static inline int vfsub_getattr(const struct path *path, struct kstat *st)
+{
+ return vfs_getattr(path, st, STATX_BASIC_STATS, AT_STATX_SYNC_AS_STAT);
+}
+
+/* ---------------------------------------------------------------------- */
+
+static inline int vfsub_setxattr(struct dentry *dentry, const char *name,