diff --git a/fs-aufs4.patch b/fs-aufs4.patch index d09417c..dcbd33c 100644 --- a/fs-aufs4.patch +++ b/fs-aufs4.patch @@ -12893,7 +12893,7 @@ index 000000000000..34b391c0dc47 +} diff --git a/fs/aufs/f_op.c b/fs/aufs/f_op.c new file mode 100644 -index 000000000000..2209ee31882b +index 000000000000..535ba566092b --- /dev/null +++ b/fs/aufs/f_op.c @@ -0,0 +1,817 @@ @@ -13266,7 +13266,7 @@ index 000000000000..2209ee31882b + if (IS_ERR(h_file)) + goto out; + -+ if (0 && au_test_loopback_kthread()) { ++ if (au_test_loopback_kthread()) { + au_warn_loopback(h_file->f_path.dentry->d_sb); + if (file->f_mapping != h_file->f_mapping) { + file->f_mapping = h_file->f_mapping; @@ -15510,7 +15510,7 @@ index 000000000000..3a8131d43a86 +} diff --git a/fs/aufs/fstype.h b/fs/aufs/fstype.h new file mode 100644 -index 000000000000..4c4b281790d6 +index 000000000000..4624f1ef222f --- /dev/null +++ b/fs/aufs/fstype.h @@ -0,0 +1,400 @@ @@ -15903,7 +15903,7 @@ index 000000000000..4c4b281790d6 + +/* + * test if the @inode is nfs with 'noacl' option -+ * NFS always sets SB_POSIXACL regardless its mount option 'noacl.' ++ * NFS always sets MS_POSIXACL regardless its mount option 'noacl.' + */ +static inline int au_test_nfs_noacl(struct inode *inode) +{ @@ -17068,7 +17068,7 @@ index 000000000000..16ee23197e3e +} diff --git a/fs/aufs/i_op.c b/fs/aufs/i_op.c new file mode 100644 -index 000000000000..c4bab514764c +index 000000000000..592d4d1c8d86 --- /dev/null +++ b/fs/aufs/i_op.c @@ -0,0 +1,1459 @@ @@ -17120,7 +17120,7 @@ index 000000000000..c4bab514764c + * - skip the lower fs test in the case of write to ro branch. + * - nfs dir permission write check is optimized, but a policy for + * link/rename requires a real check. -+ * - nfs always sets SB_POSIXACL regardless its mount option 'noacl.' ++ * - nfs always sets MS_POSIXACL regardless its mount option 'noacl.' + * in this case, generic_permission() returns -EOPNOTSUPP. + */ + if ((write_mask && !au_br_writable(brperm)) @@ -22978,10 +22978,10 @@ index 000000000000..5e501c5d4ead +#endif diff --git a/fs/aufs/loop.c b/fs/aufs/loop.c new file mode 100644 -index 000000000000..b81783916255 +index 000000000000..1acb82f0bf07 --- /dev/null +++ b/fs/aufs/loop.c -@@ -0,0 +1,163 @@ +@@ -0,0 +1,147 @@ +/* + * Copyright (C) 2005-2017 Junjiro R. Okajima + * @@ -23129,28 +23129,12 @@ index 000000000000..b81783916255 + symbol_put(loop_backing_file); + kfree(au_warn_loopback_array); +} -+ -+/* ---------------------------------------------------------------------- */ -+ -+/* support the loopback block device insude aufs */ -+ -+struct file *aufs_real_loop(struct file *file) -+{ -+ struct file *f; -+ -+ BUG_ON(!au_test_aufs(file->f_path.dentry->d_sb)); -+ fi_read_lock(file); -+ f = au_hf_top(file); -+ fi_read_unlock(file); -+ AuDebugOn(!f); -+ return f; -+} diff --git a/fs/aufs/loop.h b/fs/aufs/loop.h new file mode 100644 -index 000000000000..fd5a9753c8e2 +index 000000000000..9b02d32905f4 --- /dev/null +++ b/fs/aufs/loop.h -@@ -0,0 +1,58 @@ +@@ -0,0 +1,52 @@ +/* + * Copyright (C) 2005-2017 Junjiro R. Okajima + * @@ -23191,11 +23175,7 @@ index 000000000000..fd5a9753c8e2 + +int au_loopback_init(void); +void au_loopback_fin(void); -+ -+struct file *aufs_real_loop(struct file *file); +#else -+AuStub(struct file *, loop_backing_file, return NULL) -+ +AuStubInt0(au_test_loopback_overlap, struct super_block *sb, + struct dentry *h_adding) +AuStubInt0(au_test_loopback_kthread, void) @@ -23203,8 +23183,6 @@ index 000000000000..fd5a9753c8e2 + +AuStubInt0(au_loopback_init, void) +AuStubVoid(au_loopback_fin, void) -+ -+AuStub(struct file *, aufs_real_loop, return NULL, struct file *file) +#endif /* BLK_DEV_LOOP */ + +#endif /* __KERNEL__ */ @@ -24337,7 +24315,7 @@ index 000000000000..d961d4cc06b8 +} diff --git a/fs/aufs/opts.c b/fs/aufs/opts.c new file mode 100644 -index 000000000000..8b0478f70f4a +index 000000000000..3b18e75e0339 --- /dev/null +++ b/fs/aufs/opts.c @@ -0,0 +1,1891 @@ @@ -25144,7 +25122,7 @@ index 000000000000..8b0478f70f4a + add->perm = AuBrPerm_RO; + if (au_test_fs_rr(add->path.dentry->d_sb)) + add->perm = AuBrPerm_RR; -+ else if (!bindex && !(sb_flags & SB_RDONLY)) ++ else if (!bindex && !(sb_flags & MS_RDONLY)) + add->perm = AuBrPerm_RW; + } + opt->type = Opt_add; @@ -25820,10 +25798,10 @@ index 000000000000..8b0478f70f4a + break; + + case Opt_acl: -+ sb->s_flags |= SB_POSIXACL; ++ sb->s_flags |= MS_POSIXACL; + break; + case Opt_noacl: -+ sb->s_flags &= ~SB_POSIXACL; ++ sb->s_flags &= ~MS_POSIXACL; + break; + + default: @@ -25950,7 +25928,7 @@ index 000000000000..8b0478f70f4a + sbinfo = au_sbi(sb); + AuDebugOn(!(sbinfo->si_mntflags & AuOptMask_UDBA)); + -+ if (!(sb_flags & SB_RDONLY)) { ++ if (!(sb_flags & MS_RDONLY)) { + if (unlikely(!au_br_writable(au_sbr_perm(sb, 0)))) + pr_warn("first branch should be rw\n"); + if (unlikely(au_opt_test(sbinfo->si_mntflags, SHWH))) @@ -25983,7 +25961,7 @@ index 000000000000..8b0478f70f4a + br->br_perm &= ~AuBrAttr_ICEX; +#if 0 + if ((br->br_perm & AuBrAttr_ICEX_SEC) -+ && (au_br_sb(br)->s_flags & SB_NOSEC)) ++ && (au_br_sb(br)->s_flags & MS_NOSEC)) + br->br_perm &= ~AuBrAttr_ICEX_SEC; +#endif + @@ -27043,7 +27021,7 @@ index 000000000000..1aea1948fd39 +} diff --git a/fs/aufs/posix_acl.c b/fs/aufs/posix_acl.c new file mode 100644 -index 000000000000..157a1af4cbc3 +index 000000000000..816a47c7df84 --- /dev/null +++ b/fs/aufs/posix_acl.c @@ -0,0 +1,102 @@ @@ -27083,7 +27061,7 @@ index 000000000000..157a1af4cbc3 + sb = inode->i_sb; + si_read_lock(sb, AuLock_FLUSH); + ii_read_lock_child(inode); -+ if (!(sb->s_flags & SB_POSIXACL)) ++ if (!(sb->s_flags & MS_POSIXACL)) + goto out; + + bindex = au_ibtop(inode); @@ -28102,10 +28080,10 @@ index 000000000000..30be8c97eaad +} diff --git a/fs/aufs/super.c b/fs/aufs/super.c new file mode 100644 -index 000000000000..34e5efc34e5b +index 000000000000..a02f68bf2145 --- /dev/null +++ b/fs/aufs/super.c -@@ -0,0 +1,1049 @@ +@@ -0,0 +1,1046 @@ +/* + * Copyright (C) 2005-2017 Junjiro R. Okajima + * @@ -28351,7 +28329,7 @@ index 000000000000..34e5efc34e5b +} while (0) + + sb = dentry->d_sb; -+ if (sb->s_flags & SB_POSIXACL) ++ if (sb->s_flags & MS_POSIXACL) + seq_puts(m, ",acl"); + + /* lock free root dinfo */ @@ -28959,10 +28937,7 @@ index 000000000000..34e5efc34e5b + .statfs = aufs_statfs, + .put_super = aufs_put_super, + .sync_fs = aufs_sync_fs, -+ .remount_fs = aufs_remount_fs, -+#ifdef CONFIG_AUFS_BDEV_LOOP -+ .real_loop = aufs_real_loop -+#endif ++ .remount_fs = aufs_remount_fs +}; + +/* ---------------------------------------------------------------------- */ @@ -29034,7 +29009,7 @@ index 000000000000..34e5efc34e5b + sbinfo = au_sbi(sb); + + /* all timestamps always follow the ones on the branch */ -+ sb->s_flags |= SB_NOATIME | SB_NODIRATIME; ++ sb->s_flags |= MS_NOATIME | MS_NODIRATIME; + sb->s_op = &aufs_sop; + sb->s_d_op = &aufs_dop; + sb->s_magic = AUFS_SUPER_MAGIC; @@ -38401,7 +38376,7 @@ index 48620c93d697..49811041dbd3 100644 #ifdef CONFIG_SECURITY diff --git a/security/device_cgroup.c b/security/device_cgroup.c -index c65b39bafdfe..e363d2205c29 100644 +index c65b39bafdfe..bb113e4bcf4a 100644 --- a/security/device_cgroup.c +++ b/security/device_cgroup.c @@ -8,6 +8,7 @@ @@ -38412,11 +38387,14 @@ index c65b39bafdfe..e363d2205c29 100644 #include #include #include -@@ -824,3 +825,4 @@ int __devcgroup_check_permission(short type, u32 major, u32 minor, - - return 0; +@@ -763,6 +764,7 @@ static ssize_t devcgroup_access_write(struct kernfs_open_file *of, + mutex_unlock(&devcgroup_mutex); + return retval ?: nbytes; } -+EXPORT_SYMBOL_GPL(__devcgroup_check_permission); ++EXPORT_SYMBOL_GPL(__devcgroup_inode_permission); + + static struct cftype dev_cgroup_files[] = { + { diff --git a/security/security.c b/security/security.c index 1cd8526cb0b7..f2e473650a56 100644 --- a/security/security.c