linux/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
..
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
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
Kconfig
Makefile
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
readdir.c
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