OpenCloudOS-Kernel/fs/overlayfs
Miklos Szeredi 708fa01597 ovl: allow upperdir inside lowerdir
Commit 146d62e5a5 ("ovl: detect overlapping layers") made sure we don't
have overlapping layers, but it also broke the arguably valid use case of

 mount -olowerdir=/,upperdir=/subdir,..

where upperdir overlaps lowerdir on the same filesystem.  This has been
causing regressions.

Revert the check, but only for the specific case where upperdir and/or
workdir are subdirectories of lowerdir.  Any other overlap (e.g. lowerdir
is subdirectory of upperdir, etc) case is crazy, so leave the check in
place for those.

Overlaps are detected at lookup time too, so reverting the mount time check
should be safe.

Fixes: 146d62e5a5 ("ovl: detect overlapping layers")
Cc: <stable@vger.kernel.org> # v5.2
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
2021-04-12 12:00:37 +02:00
..
Kconfig docs: fix broken references to text files 2020-04-20 15:35:59 -06:00
Makefile treewide: Add SPDX license identifier - Makefile/Kconfig 2019-05-21 10:50:46 +02:00
copy_up.c ovl: fix missing revert_creds() on error path 2021-04-12 12:00:36 +02:00
dir.c idmapped-mounts-v5.12 2021-02-23 13:39:45 -08:00
export.c ovl: propagate ovl_fs to ovl_decode_real_fh and ovl_encode_real_fh 2020-11-12 11:31:55 +01:00
file.c ovl: plumb through flush method 2021-04-12 12:00:36 +02:00
inode.c ovl: trivial typo fixes in the file inode.c 2021-04-12 12:00:37 +02:00
namei.c ovl: fix leaked dentry 2021-04-12 12:00:36 +02:00
overlayfs.h idmapped-mounts-v5.12 2021-02-23 13:39:45 -08:00
ovl_entry.h ovl: implement volatile-specific fsync error behaviour 2021-01-28 10:22:48 +01:00
readdir.c ovl: implement volatile-specific fsync error behaviour 2021-01-28 10:22:48 +01:00
super.c ovl: allow upperdir inside lowerdir 2021-04-12 12:00:37 +02:00
util.c ovl: fix misspellings using codespell tool 2021-04-12 12:00:37 +02:00