diff --git a/fs-aufs4.patch b/fs-aufs4.patch index 104984e..2d27056 100644 --- a/fs-aufs4.patch +++ b/fs-aufs4.patch @@ -1,9 +1,9 @@ diff --git a/Documentation/ABI/testing/debugfs-aufs b/Documentation/ABI/testing/debugfs-aufs new file mode 100644 -index 000000000000..99642d1055a2 +index 000000000000..4a6694194ba6 --- /dev/null +++ b/Documentation/ABI/testing/debugfs-aufs -@@ -0,0 +1,50 @@ +@@ -0,0 +1,55 @@ +What: /debug/aufs/si_/ +Date: March 2009 +Contact: J. R. Okajima @@ -34,15 +34,20 @@ index 000000000000..99642d1055a2 + When the aufs mount option 'noxino' is specified, it + will be empty. About XINO files, see the aufs manual. + -+What: /debug/aufs/si_/xino0, xino1 ... xinoN ++What: /debug/aufs/si_/xi0, xi1 ... xiN and xiN-N +Date: March 2009 +Contact: J. R. Okajima +Description: + It shows the consumed blocks by xino (External Inode Number + Translation Table), its link count, block size and file + size. -+ When the aufs mount option 'noxino' is specified, it -+ will be empty. About XINO files, see the aufs manual. ++ Due to the file size limit, there may exist multiple ++ xino files per branch. In this case, "-N" is added to ++ the filename and it corresponds to the index of the ++ internal xino array. "-0" is omitted. ++ When the aufs mount option 'noxino' is specified, Those ++ entries won't exist. About XINO files, see the aufs ++ manual. + +What: /debug/aufs/si_/xigen +Date: March 2009 @@ -1942,11 +1947,11 @@ index 9c125f705f78..4616bbf26e5d 100644 M: Miguel Ojeda Sandonis W: http://miguelojeda.es/auxdisplay.htm diff --git a/drivers/block/loop.c b/drivers/block/loop.c -index 55cf554bc914..bc965e5f608a 100644 +index 1a2777bc5a57..abe86f10d5b0 100644 --- a/drivers/block/loop.c +++ b/drivers/block/loop.c -@@ -713,6 +713,24 @@ static inline int is_loop_device(struct file *file) - return i && S_ISBLK(i->i_mode) && MAJOR(i->i_rdev) == LOOP_MAJOR; +@@ -737,6 +737,24 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev, + return error; } +/* @@ -2250,10 +2255,11 @@ index 000000000000..2c819a64935e +aufs-$(CONFIG_AUFS_MAGIC_SYSRQ) += sysrq.o diff --git a/fs/aufs/aufs.h b/fs/aufs/aufs.h new file mode 100644 -index 000000000000..bcf0a2e405e7 +index 000000000000..0e19d870c3fe --- /dev/null +++ b/fs/aufs/aufs.h -@@ -0,0 +1,60 @@ +@@ -0,0 +1,61 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -2316,10 +2322,11 @@ index 000000000000..bcf0a2e405e7 +#endif /* __AUFS_H__ */ diff --git a/fs/aufs/branch.c b/fs/aufs/branch.c new file mode 100644 -index 000000000000..916b5b787c0a +index 000000000000..61913f2b80fa --- /dev/null +++ b/fs/aufs/branch.c -@@ -0,0 +1,1421 @@ +@@ -0,0 +1,1422 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -3743,10 +3750,11 @@ index 000000000000..916b5b787c0a +} diff --git a/fs/aufs/branch.h b/fs/aufs/branch.h new file mode 100644 -index 000000000000..012bdfa0474e +index 000000000000..4717a1691eb4 --- /dev/null +++ b/fs/aufs/branch.h -@@ -0,0 +1,373 @@ +@@ -0,0 +1,374 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -4168,10 +4176,11 @@ index 000000000000..12782f8e0f38 +-include ${srctree}/${src}/conf_priv.mk diff --git a/fs/aufs/cpup.c b/fs/aufs/cpup.c new file mode 100644 -index 000000000000..d1b407d4b627 +index 000000000000..93d6496aaf68 --- /dev/null +++ b/fs/aufs/cpup.c @@ -0,0 +1,1441 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -4849,8 +4858,7 @@ index 000000000000..d1b407d4b627 + switch (mode & S_IFMT) { + case S_IFREG: + isreg = 1; -+ err = vfsub_create(h_dir, &h_path, S_IRUSR | S_IWUSR, -+ /*want_excl*/true); ++ err = vfsub_create(h_dir, &h_path, 0600, /*want_excl*/true); + if (!err) + err = au_do_cpup_regular(cpg, h_src_attr); + break; @@ -5615,10 +5623,11 @@ index 000000000000..d1b407d4b627 +} diff --git a/fs/aufs/cpup.h b/fs/aufs/cpup.h new file mode 100644 -index 000000000000..99295266c4a0 +index 000000000000..ce764a09006f --- /dev/null +++ b/fs/aufs/cpup.h -@@ -0,0 +1,99 @@ +@@ -0,0 +1,100 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -5720,10 +5729,11 @@ index 000000000000..99295266c4a0 +#endif /* __AUFS_CPUP_H__ */ diff --git a/fs/aufs/dbgaufs.c b/fs/aufs/dbgaufs.c new file mode 100644 -index 000000000000..3727d112bbde +index 000000000000..f269ff5ea1eb --- /dev/null +++ b/fs/aufs/dbgaufs.c -@@ -0,0 +1,477 @@ +@@ -0,0 +1,478 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -5753,7 +5763,7 @@ index 000000000000..3727d112bbde +#endif + +static struct dentry *dbgaufs; -+static const mode_t dbgaufs_mode = S_IRUSR | S_IRGRP | S_IROTH; ++static const mode_t dbgaufs_mode = 0444; + +/* 20 is max digits length of ulong 64 */ +struct dbgaufs_arg { @@ -6203,10 +6213,11 @@ index 000000000000..3727d112bbde +} diff --git a/fs/aufs/dbgaufs.h b/fs/aufs/dbgaufs.h new file mode 100644 -index 000000000000..dcb0522e08cd +index 000000000000..59d7b9d08481 --- /dev/null +++ b/fs/aufs/dbgaufs.h -@@ -0,0 +1,52 @@ +@@ -0,0 +1,53 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -6261,10 +6272,11 @@ index 000000000000..dcb0522e08cd +#endif /* __DBGAUFS_H__ */ diff --git a/fs/aufs/dcsub.c b/fs/aufs/dcsub.c new file mode 100644 -index 000000000000..61c1a255378b +index 000000000000..c850ed1af09d --- /dev/null +++ b/fs/aufs/dcsub.c -@@ -0,0 +1,225 @@ +@@ -0,0 +1,226 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -6492,10 +6504,11 @@ index 000000000000..61c1a255378b +} diff --git a/fs/aufs/dcsub.h b/fs/aufs/dcsub.h new file mode 100644 -index 000000000000..50e81bf68a5f +index 000000000000..c610133deea8 --- /dev/null +++ b/fs/aufs/dcsub.h -@@ -0,0 +1,136 @@ +@@ -0,0 +1,137 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -6634,10 +6647,11 @@ index 000000000000..50e81bf68a5f +#endif /* __AUFS_DCSUB_H__ */ diff --git a/fs/aufs/debug.c b/fs/aufs/debug.c new file mode 100644 -index 000000000000..06ac9352280d +index 000000000000..354f04283e8f --- /dev/null +++ b/fs/aufs/debug.c -@@ -0,0 +1,440 @@ +@@ -0,0 +1,441 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -6693,7 +6707,7 @@ index 000000000000..06ac9352280d + +atomic_t aufs_debug = ATOMIC_INIT(0); +MODULE_PARM_DESC(debug, "debug print"); -+module_param_named(debug, aufs_debug, atomic_t, S_IRUGO | S_IWUSR | S_IWGRP); ++module_param_named(debug, aufs_debug, atomic_t, 0664); + +DEFINE_MUTEX(au_dbg_mtx); /* just to serialize the dbg msgs */ +char *au_plevel = KERN_DEBUG; @@ -7080,10 +7094,11 @@ index 000000000000..06ac9352280d +} diff --git a/fs/aufs/debug.h b/fs/aufs/debug.h new file mode 100644 -index 000000000000..c1325b139d18 +index 000000000000..b80bb5a9ab4d --- /dev/null +++ b/fs/aufs/debug.h -@@ -0,0 +1,225 @@ +@@ -0,0 +1,226 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -7311,10 +7326,11 @@ index 000000000000..c1325b139d18 +#endif /* __AUFS_DEBUG_H__ */ diff --git a/fs/aufs/dentry.c b/fs/aufs/dentry.c new file mode 100644 -index 000000000000..548f4bab37ea +index 000000000000..a245117fa116 --- /dev/null +++ b/fs/aufs/dentry.c -@@ -0,0 +1,1152 @@ +@@ -0,0 +1,1153 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -8469,10 +8485,11 @@ index 000000000000..548f4bab37ea +}; diff --git a/fs/aufs/dentry.h b/fs/aufs/dentry.h new file mode 100644 -index 000000000000..8f20b51d56ed +index 000000000000..adc2ac997958 --- /dev/null +++ b/fs/aufs/dentry.h -@@ -0,0 +1,266 @@ +@@ -0,0 +1,267 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -8741,10 +8758,11 @@ index 000000000000..8f20b51d56ed +#endif /* __AUFS_DENTRY_H__ */ diff --git a/fs/aufs/dinfo.c b/fs/aufs/dinfo.c new file mode 100644 -index 000000000000..75b7ea4a5ba6 +index 000000000000..7e56fe742f1b --- /dev/null +++ b/fs/aufs/dinfo.c -@@ -0,0 +1,553 @@ +@@ -0,0 +1,554 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -9300,10 +9318,11 @@ index 000000000000..75b7ea4a5ba6 +} diff --git a/fs/aufs/dir.c b/fs/aufs/dir.c new file mode 100644 -index 000000000000..4b4a6de786b3 +index 000000000000..95cbafd9e4c2 --- /dev/null +++ b/fs/aufs/dir.c -@@ -0,0 +1,759 @@ +@@ -0,0 +1,760 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -9782,7 +9801,7 @@ index 000000000000..4b4a6de786b3 + struct inode *inode, *h_inode; + struct super_block *sb; + -+ AuDbg("%pD, ctx{%pf, %llu}\n", file, ctx->actor, ctx->pos); ++ AuDbg("%pD, ctx{%ps, %llu}\n", file, ctx->actor, ctx->pos); + + dentry = file->f_path.dentry; + inode = d_inode(dentry); @@ -10065,10 +10084,11 @@ index 000000000000..4b4a6de786b3 +}; diff --git a/fs/aufs/dir.h b/fs/aufs/dir.h new file mode 100644 -index 000000000000..b3eb2f73c31f +index 000000000000..e7acabe09b52 --- /dev/null +++ b/fs/aufs/dir.h -@@ -0,0 +1,131 @@ +@@ -0,0 +1,132 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -10202,10 +10222,11 @@ index 000000000000..b3eb2f73c31f +#endif /* __AUFS_DIR_H__ */ diff --git a/fs/aufs/dirren.c b/fs/aufs/dirren.c new file mode 100644 -index 000000000000..dd9dfaea362a +index 000000000000..63a4024ba428 --- /dev/null +++ b/fs/aufs/dirren.c -@@ -0,0 +1,1315 @@ +@@ -0,0 +1,1316 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2017-2018 Junjiro R. Okajima + * @@ -11523,10 +11544,11 @@ index 000000000000..dd9dfaea362a +} diff --git a/fs/aufs/dirren.h b/fs/aufs/dirren.h new file mode 100644 -index 000000000000..847480eeb251 +index 000000000000..f5139a30c827 --- /dev/null +++ b/fs/aufs/dirren.h -@@ -0,0 +1,139 @@ +@@ -0,0 +1,140 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2017-2018 Junjiro R. Okajima + * @@ -11668,10 +11690,11 @@ index 000000000000..847480eeb251 +#endif /* __AUFS_DIRREN_H__ */ diff --git a/fs/aufs/dynop.c b/fs/aufs/dynop.c new file mode 100644 -index 000000000000..d38dd77a7809 +index 000000000000..6cc9040372d7 --- /dev/null +++ b/fs/aufs/dynop.c -@@ -0,0 +1,369 @@ +@@ -0,0 +1,370 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2010-2018 Junjiro R. Okajima + * @@ -12043,10 +12066,11 @@ index 000000000000..d38dd77a7809 +} diff --git a/fs/aufs/dynop.h b/fs/aufs/dynop.h new file mode 100644 -index 000000000000..81a770505115 +index 000000000000..d4015351e709 --- /dev/null +++ b/fs/aufs/dynop.h -@@ -0,0 +1,74 @@ +@@ -0,0 +1,75 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2010-2018 Junjiro R. Okajima + * @@ -12123,10 +12147,11 @@ index 000000000000..81a770505115 +#endif /* __AUFS_DYNOP_H__ */ diff --git a/fs/aufs/export.c b/fs/aufs/export.c new file mode 100644 -index 000000000000..4cf60fce3116 +index 000000000000..f64dd0a9d7bd --- /dev/null +++ b/fs/aufs/export.c -@@ -0,0 +1,837 @@ +@@ -0,0 +1,838 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -12966,10 +12991,11 @@ index 000000000000..4cf60fce3116 +} diff --git a/fs/aufs/f_op.c b/fs/aufs/f_op.c new file mode 100644 -index 000000000000..00df9096a720 +index 000000000000..abddd5f904df --- /dev/null +++ b/fs/aufs/f_op.c -@@ -0,0 +1,817 @@ +@@ -0,0 +1,818 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -13789,10 +13815,11 @@ index 000000000000..00df9096a720 +}; diff --git a/fs/aufs/fhsm.c b/fs/aufs/fhsm.c new file mode 100644 -index 000000000000..d35d726acaf6 +index 000000000000..9162fb324a05 --- /dev/null +++ b/fs/aufs/fhsm.c -@@ -0,0 +1,426 @@ +@@ -0,0 +1,427 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2011-2018 Junjiro R. Okajima + * @@ -14221,10 +14248,11 @@ index 000000000000..d35d726acaf6 +} diff --git a/fs/aufs/file.c b/fs/aufs/file.c new file mode 100644 -index 000000000000..4646b4b02b56 +index 000000000000..2de9a8d0cbef --- /dev/null +++ b/fs/aufs/file.c -@@ -0,0 +1,856 @@ +@@ -0,0 +1,857 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -15083,10 +15111,11 @@ index 000000000000..4646b4b02b56 +}; diff --git a/fs/aufs/file.h b/fs/aufs/file.h new file mode 100644 -index 000000000000..d36674eb478b +index 000000000000..ecf099569c88 --- /dev/null +++ b/fs/aufs/file.h -@@ -0,0 +1,340 @@ +@@ -0,0 +1,341 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -15429,10 +15458,11 @@ index 000000000000..d36674eb478b +#endif /* __AUFS_FILE_H__ */ diff --git a/fs/aufs/finfo.c b/fs/aufs/finfo.c new file mode 100644 -index 000000000000..3144f462aa24 +index 000000000000..513d48222ba6 --- /dev/null +++ b/fs/aufs/finfo.c -@@ -0,0 +1,148 @@ +@@ -0,0 +1,149 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -15583,10 +15613,11 @@ index 000000000000..3144f462aa24 +} diff --git a/fs/aufs/fstype.h b/fs/aufs/fstype.h new file mode 100644 -index 000000000000..7562506dc0ea +index 000000000000..4e295869be1c --- /dev/null +++ b/fs/aufs/fstype.h -@@ -0,0 +1,400 @@ +@@ -0,0 +1,401 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -15989,10 +16020,11 @@ index 000000000000..7562506dc0ea +#endif /* __AUFS_FSTYPE_H__ */ diff --git a/fs/aufs/hbl.h b/fs/aufs/hbl.h new file mode 100644 -index 000000000000..328586e37fd4 +index 000000000000..265d7ab616e9 --- /dev/null +++ b/fs/aufs/hbl.h -@@ -0,0 +1,64 @@ +@@ -0,0 +1,65 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2017-2018 Junjiro R. Okajima + * @@ -16059,10 +16091,11 @@ index 000000000000..328586e37fd4 +#endif /* __AUFS_HBL_H__ */ diff --git a/fs/aufs/hfsnotify.c b/fs/aufs/hfsnotify.c new file mode 100644 -index 000000000000..edd7f638529d +index 000000000000..a0db252a8240 --- /dev/null +++ b/fs/aufs/hfsnotify.c -@@ -0,0 +1,289 @@ +@@ -0,0 +1,290 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -16354,10 +16387,11 @@ index 000000000000..edd7f638529d +}; diff --git a/fs/aufs/hfsplus.c b/fs/aufs/hfsplus.c new file mode 100644 -index 000000000000..f4ed51678567 +index 000000000000..7435a46dda84 --- /dev/null +++ b/fs/aufs/hfsplus.c -@@ -0,0 +1,56 @@ +@@ -0,0 +1,57 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2010-2018 Junjiro R. Okajima + * @@ -16416,10 +16450,11 @@ index 000000000000..f4ed51678567 +} diff --git a/fs/aufs/hnotify.c b/fs/aufs/hnotify.c new file mode 100644 -index 000000000000..2ea836223b90 +index 000000000000..bd4bce90d7ba --- /dev/null +++ b/fs/aufs/hnotify.c -@@ -0,0 +1,719 @@ +@@ -0,0 +1,720 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -17141,10 +17176,11 @@ index 000000000000..2ea836223b90 +} diff --git a/fs/aufs/i_op.c b/fs/aufs/i_op.c new file mode 100644 -index 000000000000..e3a2829ec763 +index 000000000000..3c9adcd164b1 --- /dev/null +++ b/fs/aufs/i_op.c -@@ -0,0 +1,1459 @@ +@@ -0,0 +1,1460 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -17186,7 +17222,7 @@ index 000000000000..e3a2829ec763 + if (((mask & MAY_EXEC) + && S_ISREG(h_inode->i_mode) + && (path_noexec(h_path) -+ || !(h_inode->i_mode & S_IXUGO)))) ++ || !(h_inode->i_mode & 0111)))) + goto out; + + /* @@ -17201,7 +17237,7 @@ index 000000000000..e3a2829ec763 + && write_mask && !(mask & MAY_READ)) + || !h_inode->i_op->permission) { + /* AuLabel(generic_permission); */ -+ /* AuDbg("get_acl %pf\n", h_inode->i_op->get_acl); */ ++ /* AuDbg("get_acl %ps\n", h_inode->i_op->get_acl); */ + err = generic_permission(h_inode, mask); + if (err == -EOPNOTSUPP && au_test_nfs_noacl(h_inode)) + err = h_inode->i_op->permission(h_inode, mask); @@ -18458,7 +18494,7 @@ index 000000000000..e3a2829ec763 + goto out_unlock; + + err = 0; -+ AuDbg("%pf\n", h_inode->i_op->get_link); ++ AuDbg("%ps\n", h_inode->i_op->get_link); + AuDbgDentry(h_dentry); + ret = vfs_get_link(h_dentry, done); + dput(h_dentry); @@ -18606,10 +18642,11 @@ index 000000000000..e3a2829ec763 +}; diff --git a/fs/aufs/i_op_add.c b/fs/aufs/i_op_add.c new file mode 100644 -index 000000000000..a9e405292267 +index 000000000000..42abd1ad21ab --- /dev/null +++ b/fs/aufs/i_op_add.c -@@ -0,0 +1,920 @@ +@@ -0,0 +1,921 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -19532,10 +19569,11 @@ index 000000000000..a9e405292267 +} diff --git a/fs/aufs/i_op_del.c b/fs/aufs/i_op_del.c new file mode 100644 -index 000000000000..120ceaad2c8b +index 000000000000..9c49efa16d5e --- /dev/null +++ b/fs/aufs/i_op_del.c -@@ -0,0 +1,511 @@ +@@ -0,0 +1,512 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -20049,10 +20087,11 @@ index 000000000000..120ceaad2c8b +} diff --git a/fs/aufs/i_op_ren.c b/fs/aufs/i_op_ren.c new file mode 100644 -index 000000000000..eb57654a87d4 +index 000000000000..beb59d1d0a29 --- /dev/null +++ b/fs/aufs/i_op_ren.c -@@ -0,0 +1,1246 @@ +@@ -0,0 +1,1247 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -21301,10 +21340,11 @@ index 000000000000..eb57654a87d4 +} diff --git a/fs/aufs/iinfo.c b/fs/aufs/iinfo.c new file mode 100644 -index 000000000000..d5cba3b98eb5 +index 000000000000..b197398e9fdb --- /dev/null +++ b/fs/aufs/iinfo.c -@@ -0,0 +1,285 @@ +@@ -0,0 +1,286 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -21592,10 +21632,11 @@ index 000000000000..d5cba3b98eb5 +} diff --git a/fs/aufs/inode.c b/fs/aufs/inode.c new file mode 100644 -index 000000000000..6dee92dd842a +index 000000000000..50ec91179d17 --- /dev/null +++ b/fs/aufs/inode.c -@@ -0,0 +1,527 @@ +@@ -0,0 +1,528 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -22125,10 +22166,11 @@ index 000000000000..6dee92dd842a +} diff --git a/fs/aufs/inode.h b/fs/aufs/inode.h new file mode 100644 -index 000000000000..8af51ff5fd1e +index 000000000000..28e61b270e58 --- /dev/null +++ b/fs/aufs/inode.h -@@ -0,0 +1,695 @@ +@@ -0,0 +1,696 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -22826,10 +22868,11 @@ index 000000000000..8af51ff5fd1e +#endif /* __AUFS_INODE_H__ */ diff --git a/fs/aufs/ioctl.c b/fs/aufs/ioctl.c new file mode 100644 -index 000000000000..de188adb359e +index 000000000000..b244842eb039 --- /dev/null +++ b/fs/aufs/ioctl.c -@@ -0,0 +1,219 @@ +@@ -0,0 +1,220 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -23051,10 +23094,11 @@ index 000000000000..de188adb359e +#endif diff --git a/fs/aufs/loop.c b/fs/aufs/loop.c new file mode 100644 -index 000000000000..983ef98762f7 +index 000000000000..0c6af623a45e --- /dev/null +++ b/fs/aufs/loop.c -@@ -0,0 +1,147 @@ +@@ -0,0 +1,148 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -23204,10 +23248,11 @@ index 000000000000..983ef98762f7 +} diff --git a/fs/aufs/loop.h b/fs/aufs/loop.h new file mode 100644 -index 000000000000..e6b76609a4b2 +index 000000000000..048a6504f679 --- /dev/null +++ b/fs/aufs/loop.h -@@ -0,0 +1,52 @@ +@@ -0,0 +1,53 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -23299,10 +23344,11 @@ index 000000000000..7bc9eef3ffec +endif diff --git a/fs/aufs/module.c b/fs/aufs/module.c new file mode 100644 -index 000000000000..bba8a5762a26 +index 000000000000..5f5f67e6493c --- /dev/null +++ b/fs/aufs/module.c -@@ -0,0 +1,272 @@ +@@ -0,0 +1,273 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -23454,12 +23500,12 @@ index 000000000000..bba8a5762a26 +/* this module parameter has no meaning when SYSFS is disabled */ +int sysaufs_brs = 1; +MODULE_PARM_DESC(brs, "use /fs/aufs/si_*/brN"); -+module_param_named(brs, sysaufs_brs, int, S_IRUGO); ++module_param_named(brs, sysaufs_brs, int, 0444); + +/* this module parameter has no meaning when USER_NS is disabled */ +bool au_userns; +MODULE_PARM_DESC(allow_userns, "allow unprivileged to mount under userns"); -+module_param_named(allow_userns, au_userns, bool, S_IRUGO); ++module_param_named(allow_userns, au_userns, bool, 0444); + +/* ---------------------------------------------------------------------- */ + @@ -23577,10 +23623,11 @@ index 000000000000..bba8a5762a26 +module_exit(aufs_exit); diff --git a/fs/aufs/module.h b/fs/aufs/module.h new file mode 100644 -index 000000000000..6d222d1c654b +index 000000000000..000761049351 --- /dev/null +++ b/fs/aufs/module.h -@@ -0,0 +1,101 @@ +@@ -0,0 +1,102 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -23684,10 +23731,11 @@ index 000000000000..6d222d1c654b +#endif /* __AUFS_MODULE_H__ */ diff --git a/fs/aufs/mvdown.c b/fs/aufs/mvdown.c new file mode 100644 -index 000000000000..b51219658aa8 +index 000000000000..9603ef7395e4 --- /dev/null +++ b/fs/aufs/mvdown.c -@@ -0,0 +1,704 @@ +@@ -0,0 +1,705 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2011-2018 Junjiro R. Okajima + * @@ -24394,10 +24442,11 @@ index 000000000000..b51219658aa8 +} diff --git a/fs/aufs/opts.c b/fs/aufs/opts.c new file mode 100644 -index 000000000000..45fa31653ff5 +index 000000000000..e1f152a50daf --- /dev/null +++ b/fs/aufs/opts.c -@@ -0,0 +1,1890 @@ +@@ -0,0 +1,1891 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -26290,10 +26339,11 @@ index 000000000000..45fa31653ff5 +} diff --git a/fs/aufs/opts.h b/fs/aufs/opts.h new file mode 100644 -index 000000000000..30bda60f7f92 +index 000000000000..fd167bd0fead --- /dev/null +++ b/fs/aufs/opts.h -@@ -0,0 +1,224 @@ +@@ -0,0 +1,225 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -26520,10 +26570,11 @@ index 000000000000..30bda60f7f92 +#endif /* __AUFS_OPTS_H__ */ diff --git a/fs/aufs/plink.c b/fs/aufs/plink.c new file mode 100644 -index 000000000000..f1a569f2337e +index 000000000000..aa634cbbcfd7 --- /dev/null +++ b/fs/aufs/plink.c -@@ -0,0 +1,515 @@ +@@ -0,0 +1,516 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -27041,10 +27092,11 @@ index 000000000000..f1a569f2337e +} diff --git a/fs/aufs/poll.c b/fs/aufs/poll.c new file mode 100644 -index 000000000000..b7847c3f3a44 +index 000000000000..39d3cad77296 --- /dev/null +++ b/fs/aufs/poll.c -@@ -0,0 +1,53 @@ +@@ -0,0 +1,54 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -27100,10 +27152,11 @@ index 000000000000..b7847c3f3a44 +} diff --git a/fs/aufs/posix_acl.c b/fs/aufs/posix_acl.c new file mode 100644 -index 000000000000..bbd7aa2ec605 +index 000000000000..9ce21ec98453 --- /dev/null +++ b/fs/aufs/posix_acl.c -@@ -0,0 +1,102 @@ +@@ -0,0 +1,103 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2014-2018 Junjiro R. Okajima + * @@ -27208,10 +27261,11 @@ index 000000000000..bbd7aa2ec605 +} diff --git a/fs/aufs/procfs.c b/fs/aufs/procfs.c new file mode 100644 -index 000000000000..6201739c6e61 +index 000000000000..100dbcfebaa7 --- /dev/null +++ b/fs/aufs/procfs.c -@@ -0,0 +1,170 @@ +@@ -0,0 +1,171 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2010-2018 Junjiro R. Okajima + * @@ -27368,7 +27422,7 @@ index 000000000000..6201739c6e61 + if (unlikely(!au_procfs_dir)) + goto out; + -+ entry = proc_create(AUFS_PLINK_MAINT_NAME, S_IFREG | S_IWUSR, ++ entry = proc_create(AUFS_PLINK_MAINT_NAME, S_IFREG | 0200, + au_procfs_dir, &au_procfs_plm_fop); + if (unlikely(!entry)) + goto out_dir; @@ -27384,10 +27438,11 @@ index 000000000000..6201739c6e61 +} diff --git a/fs/aufs/rdu.c b/fs/aufs/rdu.c new file mode 100644 -index 000000000000..f6a10f553734 +index 000000000000..60f4957b7d2b --- /dev/null +++ b/fs/aufs/rdu.c -@@ -0,0 +1,381 @@ +@@ -0,0 +1,382 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -27771,10 +27826,11 @@ index 000000000000..f6a10f553734 +#endif diff --git a/fs/aufs/rwsem.h b/fs/aufs/rwsem.h new file mode 100644 -index 000000000000..e4711f6f7ab5 +index 000000000000..22ff55e6c644 --- /dev/null +++ b/fs/aufs/rwsem.h -@@ -0,0 +1,72 @@ +@@ -0,0 +1,73 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -27849,10 +27905,11 @@ index 000000000000..e4711f6f7ab5 +#endif /* __AUFS_RWSEM_H__ */ diff --git a/fs/aufs/sbinfo.c b/fs/aufs/sbinfo.c new file mode 100644 -index 000000000000..2f7c6aeb1f26 +index 000000000000..21dd45889cad --- /dev/null +++ b/fs/aufs/sbinfo.c -@@ -0,0 +1,311 @@ +@@ -0,0 +1,312 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -28166,10 +28223,11 @@ index 000000000000..2f7c6aeb1f26 +} diff --git a/fs/aufs/super.c b/fs/aufs/super.c new file mode 100644 -index 000000000000..4d0abfbd8dfb +index 000000000000..f5a7533490a8 --- /dev/null +++ b/fs/aufs/super.c -@@ -0,0 +1,1042 @@ +@@ -0,0 +1,1043 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -28912,7 +28970,7 @@ index 000000000000..4d0abfbd8dfb + AuDebugOn(sbi->si_iop_array == aufs_iop); + sbi->si_iop_array = aufs_iop; + } -+ pr_info("reset to %pf and %pf\n", ++ pr_info("reset to %ps and %ps\n", + sb->s_d_op, sbi->si_iop_array); + } + @@ -29132,7 +29190,7 @@ index 000000000000..4d0abfbd8dfb + au_opts_free(&opts); + if (!err && au_ftest_si(sbinfo, NO_DREVAL)) { + sb->s_d_op = &aufs_dop_noreval; -+ pr_info("%pf\n", sb->s_d_op); ++ pr_info("%ps\n", sb->s_d_op); + au_refresh_dop(root, /*force_reval*/0); + sbinfo->si_iop_array = aufs_iop_nogetattr; + au_refresh_iop(inode, /*force_getattr*/0); @@ -29214,10 +29272,11 @@ index 000000000000..4d0abfbd8dfb +}; diff --git a/fs/aufs/super.h b/fs/aufs/super.h new file mode 100644 -index 000000000000..d23de85ea1a4 +index 000000000000..d4a21be9cc98 --- /dev/null +++ b/fs/aufs/super.h -@@ -0,0 +1,626 @@ +@@ -0,0 +1,627 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -29846,10 +29905,11 @@ index 000000000000..d23de85ea1a4 +#endif /* __AUFS_SUPER_H__ */ diff --git a/fs/aufs/sysaufs.c b/fs/aufs/sysaufs.c new file mode 100644 -index 000000000000..798645bac624 +index 000000000000..cb34a53f38f6 --- /dev/null +++ b/fs/aufs/sysaufs.c -@@ -0,0 +1,92 @@ +@@ -0,0 +1,93 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -29944,10 +30004,11 @@ index 000000000000..798645bac624 +} diff --git a/fs/aufs/sysaufs.h b/fs/aufs/sysaufs.h new file mode 100644 -index 000000000000..50aca1dc8318 +index 000000000000..9a64191c51b8 --- /dev/null +++ b/fs/aufs/sysaufs.h -@@ -0,0 +1,101 @@ +@@ -0,0 +1,102 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -30051,10 +30112,11 @@ index 000000000000..50aca1dc8318 +#endif /* __SYSAUFS_H__ */ diff --git a/fs/aufs/sysfs.c b/fs/aufs/sysfs.c new file mode 100644 -index 000000000000..0fef3a3cc4d2 +index 000000000000..89a4cbf66ce9 --- /dev/null +++ b/fs/aufs/sysfs.c -@@ -0,0 +1,372 @@ +@@ -0,0 +1,373 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -30370,7 +30432,7 @@ index 000000000000..0fef3a3cc4d2 + attr = &br_sysfs->attr; + sysfs_attr_init(attr); + attr->name = br_sysfs->name; -+ attr->mode = S_IRUGO; ++ attr->mode = 0444; + br_sysfs++; + } +} @@ -30429,10 +30491,11 @@ index 000000000000..0fef3a3cc4d2 +} diff --git a/fs/aufs/sysrq.c b/fs/aufs/sysrq.c new file mode 100644 -index 000000000000..401c1e8eca5d +index 000000000000..b9daece7a6bc --- /dev/null +++ b/fs/aufs/sysrq.c -@@ -0,0 +1,159 @@ +@@ -0,0 +1,160 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -30545,7 +30608,7 @@ index 000000000000..401c1e8eca5d + +/* module parameter */ +static char *aufs_sysrq_key = "a"; -+module_param_named(sysrq, aufs_sysrq_key, charp, S_IRUGO); ++module_param_named(sysrq, aufs_sysrq_key, charp, 0444); +MODULE_PARM_DESC(sysrq, "MagicSysRq key for " AUFS_NAME); + +static void au_sysrq(int key __maybe_unused) @@ -30594,10 +30657,11 @@ index 000000000000..401c1e8eca5d +} diff --git a/fs/aufs/vdir.c b/fs/aufs/vdir.c new file mode 100644 -index 000000000000..8d0a23c51580 +index 000000000000..5b78b5db7f5a --- /dev/null +++ b/fs/aufs/vdir.c -@@ -0,0 +1,893 @@ +@@ -0,0 +1,894 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -31493,10 +31557,11 @@ index 000000000000..8d0a23c51580 +} diff --git a/fs/aufs/vfsub.c b/fs/aufs/vfsub.c new file mode 100644 -index 000000000000..732d81cb45cc +index 000000000000..00f7a3cc0179 --- /dev/null +++ b/fs/aufs/vfsub.c -@@ -0,0 +1,894 @@ +@@ -0,0 +1,895 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -32084,7 +32149,7 @@ index 000000000000..732d81cb45cc +{ + int err; + -+ AuDbg("%pD, ctx{%pf, %llu}\n", file, ctx->actor, ctx->pos); ++ AuDbg("%pD, ctx{%ps, %llu}\n", file, ctx->actor, ctx->pos); + + lockdep_off(); + err = iterate_dir(file, ctx); @@ -32393,10 +32458,11 @@ index 000000000000..732d81cb45cc +} diff --git a/fs/aufs/vfsub.h b/fs/aufs/vfsub.h new file mode 100644 -index 000000000000..0a4012d11379 +index 000000000000..42468b8e5750 --- /dev/null +++ b/fs/aufs/vfsub.h -@@ -0,0 +1,354 @@ +@@ -0,0 +1,355 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -32753,10 +32819,11 @@ index 000000000000..0a4012d11379 +#endif /* __AUFS_VFSUB_H__ */ diff --git a/fs/aufs/wbr_policy.c b/fs/aufs/wbr_policy.c new file mode 100644 -index 000000000000..1d365a2e7ff3 +index 000000000000..6e97c806a1e7 --- /dev/null +++ b/fs/aufs/wbr_policy.c @@ -0,0 +1,830 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -32885,8 +32952,7 @@ index 000000000000..1d365a2e7ff3 + goto out; + h_path.dentry = au_h_dptr(dentry, bdst); + h_path.mnt = au_sbr_mnt(dentry->d_sb, bdst); -+ err = vfsub_sio_mkdir(au_h_iptr(dir, bdst), &h_path, -+ S_IRWXU | S_IRUGO | S_IXUGO); ++ err = vfsub_sio_mkdir(au_h_iptr(dir, bdst), &h_path, 0755); + if (unlikely(err)) + goto out_put; + au_fset_cpdown(*flags, MADE_DIR); @@ -33589,10 +33655,11 @@ index 000000000000..1d365a2e7ff3 +}; diff --git a/fs/aufs/whout.c b/fs/aufs/whout.c new file mode 100644 -index 000000000000..c5cf34e2b561 +index 000000000000..5244085acf08 --- /dev/null +++ b/fs/aufs/whout.c -@@ -0,0 +1,1061 @@ +@@ -0,0 +1,1062 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -33616,7 +33683,7 @@ index 000000000000..c5cf34e2b561 + +#include "aufs.h" + -+#define WH_MASK S_IRUGO ++#define WH_MASK 0444 + +/* + * If a directory contains this file, then it is opaque. We start with the @@ -33909,10 +33976,10 @@ index 000000000000..c5cf34e2b561 + + err = -EEXIST; + if (d_is_negative(path->dentry)) { -+ int mode = S_IRWXU; ++ int mode = 0700; + + if (au_test_nfs(path->dentry->d_sb)) -+ mode |= S_IXUGO; ++ mode |= 0111; + err = vfsub_mkdir(h_dir, path, mode); + } else if (d_is_dir(path->dentry)) + err = 0; @@ -34656,10 +34723,11 @@ index 000000000000..c5cf34e2b561 +} diff --git a/fs/aufs/whout.h b/fs/aufs/whout.h new file mode 100644 -index 000000000000..766a1d9301ac +index 000000000000..2bbc38ba372c --- /dev/null +++ b/fs/aufs/whout.h -@@ -0,0 +1,85 @@ +@@ -0,0 +1,86 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -34747,10 +34815,11 @@ index 000000000000..766a1d9301ac +#endif /* __AUFS_WHOUT_H__ */ diff --git a/fs/aufs/wkq.c b/fs/aufs/wkq.c new file mode 100644 -index 000000000000..a3316e7e5101 +index 000000000000..4788ae25fbcd --- /dev/null +++ b/fs/aufs/wkq.c -@@ -0,0 +1,390 @@ +@@ -0,0 +1,391 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -35143,10 +35212,11 @@ index 000000000000..a3316e7e5101 +} diff --git a/fs/aufs/wkq.h b/fs/aufs/wkq.h new file mode 100644 -index 000000000000..9fc86c11aeed +index 000000000000..acfccd5092b7 --- /dev/null +++ b/fs/aufs/wkq.h -@@ -0,0 +1,93 @@ +@@ -0,0 +1,94 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -35242,10 +35312,11 @@ index 000000000000..9fc86c11aeed +#endif /* __AUFS_WKQ_H__ */ diff --git a/fs/aufs/xattr.c b/fs/aufs/xattr.c new file mode 100644 -index 000000000000..792317c7f364 +index 000000000000..70b891716e49 --- /dev/null +++ b/fs/aufs/xattr.c -@@ -0,0 +1,355 @@ +@@ -0,0 +1,356 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2014-2018 Junjiro R. Okajima + * @@ -35603,10 +35674,11 @@ index 000000000000..792317c7f364 +} diff --git a/fs/aufs/xino.c b/fs/aufs/xino.c new file mode 100644 -index 000000000000..08b7aa9da1f6 +index 000000000000..67b1a6aab0b9 --- /dev/null +++ b/fs/aufs/xino.c -@@ -0,0 +1,1598 @@ +@@ -0,0 +1,1593 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -35763,7 +35835,7 @@ index 000000000000..08b7aa9da1f6 + */ + file = vfsub_filp_open(fpath, O_RDWR | O_CREAT | O_EXCL | O_LARGEFILE + /* | __FMODE_NONOTIFY */, -+ S_IRUGO | S_IWUGO); ++ 0666); + if (IS_ERR(file)) { + if (!silent) + pr_err("open %s(%ld)\n", fpath, PTR_ERR(file)); @@ -35839,7 +35911,7 @@ index 000000000000..08b7aa9da1f6 + } + + /* no need to mnt_want_write() since we call dentry_open() later */ -+ err = vfs_create(dir, path.dentry, S_IRUGO | S_IWUGO, NULL); ++ err = vfs_create(dir, path.dentry, 0666, NULL); + if (unlikely(err)) { + file = ERR_PTR(err); + pr_err("%pd create err %d\n", dentry, err); @@ -36743,51 +36815,65 @@ index 000000000000..08b7aa9da1f6 + } +} + ++struct au_xino_do_set_br { ++ vfs_writef_t writef; ++ struct au_branch *br; ++ ino_t h_ino; ++ aufs_bindex_t bshared; ++}; ++ ++static int au_xino_do_set_br(struct super_block *sb, struct path *path, ++ struct au_xino_do_set_br *args) ++{ ++ int err; ++ struct file *file; ++ ++ if (args->bshared >= 0) { ++ /* shared xino */ ++ au_xino_set_br_shared(sb, args->br, args->bshared); ++ file = au_xino_file(args->br); ++ goto out_ino; /* success */ ++ } ++ ++ /* new xino */ ++ file = au_xino_create2(sb, path, au_xino_file(args->br)); ++ err = PTR_ERR(file); ++ if (IS_ERR(file)) ++ goto out; ++ if (!args->br->br_xino) { ++ err = au_xino_init(args->br, file); ++ fput(file); ++ if (unlikely(err)) ++ goto out; ++ } else { ++ au_xino_file_set(args->br, file); ++ fput(file); ++ } ++ ++out_ino: ++ err = au_xino_do_write(args->writef, file, args->h_ino, AUFS_ROOT_INO); ++out: ++ AuTraceErr(err); ++ return err; ++} ++ +static int au_xino_set_br(struct super_block *sb, struct path *path) +{ + int err; -+ ino_t h_ino; -+ aufs_bindex_t bindex, bbot, bshared; -+ struct file *f; -+ struct au_branch *br; ++ aufs_bindex_t bindex, bbot; ++ struct au_xino_do_set_br args; + struct inode *inode; -+ vfs_writef_t writef; -+ struct au_xino *xi; + + SiMustWriteLock(sb); + + bbot = au_sbbot(sb); + inode = d_inode(sb->s_root); -+ writef = au_sbi(sb)->si_xwrite; ++ args.writef = au_sbi(sb)->si_xwrite; + for (bindex = 0; bindex <= bbot; bindex++) { -+ br = au_sbr(sb, bindex); -+ bshared = is_sb_shared(sb, bindex, bindex - 1); -+ if (bshared >= 0) { -+ /* shared xino */ -+ au_xino_set_br_shared(sb, br, bshared); -+ f = au_xino_file(br); -+ goto ino; -+ } -+ -+ /* new xino */ -+ f = au_xino_create2(sb, path, au_xino_file(br)); -+ err = PTR_ERR(f); -+ if (IS_ERR(f)) -+ break; -+ xi = br->br_xino; -+ if (!xi) { -+ err = au_xino_init(br, f); -+ fput(f); -+ if (unlikely(err)) -+ break; -+ } else { -+ au_xino_file_set(br, f); -+ fput(f); -+ } -+ -+ ino: /* indented label */ -+ h_ino = au_h_iptr(inode, bindex)->i_ino; -+ err = au_xino_do_write(writef, f, h_ino, AUFS_ROOT_INO); ++ args.h_ino = au_h_iptr(inode, bindex)->i_ino; ++ args.br = au_sbr(sb, bindex); ++ args.bshared = is_sb_shared(sb, bindex, bindex - 1); ++ err = au_xino_do_set_br(sb, path, &args); + if (unlikely(err)) + break; + } @@ -36936,38 +37022,18 @@ index 000000000000..08b7aa9da1f6 + struct path *base) +{ + int err; -+ aufs_bindex_t bshared; -+ struct file *file; ++ struct au_xino_do_set_br args = { ++ .h_ino = h_ino, ++ .br = br ++ }; + -+ err = 0; -+ bshared = sbr_find_shared(sb, /*btop*/0, au_sbbot(sb), au_br_sb(br)); -+ if (bshared >= 0) { -+ au_xino_set_br_shared(sb, br, bshared); -+ file = au_xino_file(br); -+ goto out_ino; /* success */ -+ } -+ -+ file = au_xino_create2(sb, base, NULL); -+ err = PTR_ERR(file); -+ if (IS_ERR(file)) -+ goto out; -+ -+ if (!br->br_xino) { -+ err = au_xino_init(br, file); -+ fput(file); -+ if (unlikely(err)) -+ goto out; -+ } else { -+ au_xino_file_set(br, file); -+ fput(file); -+ } -+ -+out_ino: -+ err = au_xino_do_write(au_sbi(sb)->si_xwrite, file, h_ino, -+ AUFS_ROOT_INO); ++ args.writef = au_sbi(sb)->si_xwrite; ++ args.bshared = sbr_find_shared(sb, /*btop*/0, au_sbbot(sb), ++ au_br_sb(br)); ++ err = au_xino_do_set_br(sb, base, &args); + if (unlikely(err)) + au_xino_put(br); -+out: ++ + return err; +} + @@ -37313,7 +37379,7 @@ index 7ec0b3e5f05d..819ee0705035 100644 void __init files_init(void) { diff --git a/fs/inode.c b/fs/inode.c -index 3b55391072f3..17505c7e8c91 100644 +index 6c6fef8c7c27..e8400fdd71dc 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -861,6 +861,8 @@ unsigned int get_next_ino(void) @@ -37422,17 +37488,17 @@ index b7a4b6a69efa..5a69d6024c65 100644 int fsnotify_fasync(int fd, struct file *file, int on) { diff --git a/fs/notify/mark.c b/fs/notify/mark.c -index e9191b416434..1f8ccfaddd9f 100644 +index e9191b416434..612691d66ead 100644 --- a/fs/notify/mark.c +++ b/fs/notify/mark.c -@@ -108,6 +108,7 @@ void fsnotify_get_mark(struct fsnotify_mark *mark) - WARN_ON_ONCE(!refcount_read(&mark->refcnt)); - refcount_inc(&mark->refcnt); +@@ -245,6 +245,7 @@ void fsnotify_put_mark(struct fsnotify_mark *mark) + queue_delayed_work(system_unbound_wq, &reaper_work, + FSNOTIFY_REAPER_DELAY); } +EXPORT_SYMBOL_GPL(fsnotify_put_mark); - static void __fsnotify_recalc_mask(struct fsnotify_mark_connector *conn) - { + /* + * Get mark reference when we found the mark via lockless traversal of object @@ -392,6 +393,7 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark, mutex_unlock(&group->mark_mutex); fsnotify_free_mark(mark); @@ -37441,14 +37507,14 @@ index e9191b416434..1f8ccfaddd9f 100644 /* * Sorting function for lists of fsnotify marks. -@@ -606,6 +608,7 @@ int fsnotify_add_mark_locked(struct fsnotify_mark *mark, struct inode *inode, - fsnotify_put_mark(mark); +@@ -618,6 +620,7 @@ int fsnotify_add_mark(struct fsnotify_mark *mark, struct inode *inode, + mutex_unlock(&group->mark_mutex); return ret; } +EXPORT_SYMBOL_GPL(fsnotify_add_mark); - int fsnotify_add_mark(struct fsnotify_mark *mark, struct inode *inode, - struct vfsmount *mnt, int allow_dups) + /* + * Given a list of marks, find the mark associated with given group. If found @@ -741,6 +744,7 @@ void fsnotify_init_mark(struct fsnotify_mark *mark, fsnotify_get_group(group); mark->group = group; @@ -37507,7 +37573,7 @@ index 75634379f82e..7c0dc0ff4882 100644 ino = inode->i_ino; } diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c -index c486ad4b43f0..76b71f890851 100644 +index 308d64e72515..284da9e6395e 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c @@ -305,7 +305,10 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid) @@ -37522,7 +37588,7 @@ index c486ad4b43f0..76b71f890851 100644 dev = inode->i_sb->s_dev; ino = inode->i_ino; pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT; -@@ -1726,7 +1729,7 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid) +@@ -1733,7 +1736,7 @@ static int show_numa_map(struct seq_file *m, void *v, int is_pid) struct proc_maps_private *proc_priv = &numa_priv->proc_maps; struct vm_area_struct *vma = v; struct numa_maps *md = &numa_priv->md; @@ -37685,7 +37751,7 @@ index 279720db984a..76e38eade225 100644 static inline void fput_light(struct file *file, int fput_needed) { diff --git a/include/linux/fs.h b/include/linux/fs.h -index 760d8da1b6c7..09a254285125 100644 +index 81fe0292a7ac..50ee598cbbff 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1270,6 +1270,7 @@ extern void fasync_free(struct fasync_struct *); @@ -37725,7 +37791,7 @@ index 760d8da1b6c7..09a254285125 100644 /* /sys/fs */ extern struct kobject *fs_kobj; -@@ -2485,6 +2494,7 @@ static inline bool sb_is_blkdev_sb(struct super_block *sb) +@@ -2486,6 +2495,7 @@ static inline bool sb_is_blkdev_sb(struct super_block *sb) return false; } #endif @@ -37755,10 +37821,10 @@ index 6fc77d4dbdcd..27e76f0c0b4d 100644 #define lockdep_assert_held(l) do { (void)(l); } while (0) diff --git a/include/linux/mm.h b/include/linux/mm.h -index 02a616e2f17d..01b3bb99d15b 100644 +index edab43d2bec8..d195d5714dc3 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h -@@ -1380,6 +1380,28 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping, +@@ -1381,6 +1381,28 @@ static inline void unmap_shared_mapping_range(struct address_space *mapping, unmap_mapping_range(mapping, holebegin, holelen, 0); } @@ -37843,10 +37909,11 @@ index 74b4911ac16d..19789fbea567 100644 #endif diff --git a/include/uapi/linux/aufs_type.h b/include/uapi/linux/aufs_type.h new file mode 100644 -index 000000000000..296b96b6a627 +index 000000000000..31e165895b9f --- /dev/null +++ b/include/uapi/linux/aufs_type.h -@@ -0,0 +1,447 @@ +@@ -0,0 +1,448 @@ ++/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (C) 2005-2018 Junjiro R. Okajima + * @@ -37888,7 +37955,7 @@ index 000000000000..296b96b6a627 + +#include + -+#define AUFS_VERSION "4.17-20180702" ++#define AUFS_VERSION "4.17-20180730" + +/* todo? move this to linux-2.6.19/include/magic.h */ +#define AUFS_SUPER_MAGIC ('a' << 24 | 'u' << 16 | 'f' << 8 | 's') @@ -38295,10 +38362,10 @@ index 000000000000..296b96b6a627 + +#endif /* __AUFS_TYPE_H__ */ diff --git a/kernel/fork.c b/kernel/fork.c -index a5d21c42acfc..e965e093a1c4 100644 +index 5ad558e6f8fe..56949ac535fd 100644 --- a/kernel/fork.c +++ b/kernel/fork.c -@@ -473,7 +473,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm, +@@ -481,7 +481,7 @@ static __latent_entropy int dup_mmap(struct mm_struct *mm, struct inode *inode = file_inode(file); struct address_space *mapping = file->f_mapping; @@ -38365,7 +38432,7 @@ index 0604cb02e6f3..45d23696bc7c 100644 if (page->mapping != inode->i_mapping) { unlock_page(page); diff --git a/mm/mmap.c b/mm/mmap.c -index fc41c0543d7f..e3768695c18c 100644 +index 540cfab8c2c4..02ee60622ec5 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -180,7 +180,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma) @@ -38452,7 +38519,7 @@ index fc41c0543d7f..e3768695c18c 100644 out: up_write(&mm->mmap_sem); if (populate) -@@ -3220,7 +3237,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap, +@@ -3215,7 +3232,7 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap, if (anon_vma_clone(new_vma, vma)) goto out_free_mempol; if (new_vma->vm_file) @@ -38507,12 +38574,12 @@ index 13723736d38f..6362ddec0ee3 100644 diff --git a/mm/prfile.c b/mm/prfile.c new file mode 100644 -index 000000000000..14efc4f64075 +index 000000000000..a27ac3688a35 --- /dev/null +++ b/mm/prfile.c @@ -0,0 +1,86 @@ ++// SPDX-License-Identifier: GPL-2.0 +/* -+ * SPDX-License-Identifier: GPL-2.0 + * Mainly for aufs which mmap(2) different file and wants to print different + * path in /proc/PID/maps. + * Call these functions via macros defined in linux/mm.h.