Repository navigation
Commit 708fa01
Miklos Szeredi
ovl: allow upperdir inside lowerdir
Commit 146d62e ("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: 146d62e ("ovl: detect overlapping layers")
Cc: <stable@vger.kernel.org> # v5.2
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>1 parent 321b46b commit 708fa01
1 file changed
Lines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1854 | 1854 | | |
1855 | 1855 | | |
1856 | 1856 | | |
1857 | | - | |
| 1857 | + | |
| 1858 | + | |
1858 | 1859 | | |
1859 | 1860 | | |
1860 | 1861 | | |
| |||
1866 | 1867 | | |
1867 | 1868 | | |
1868 | 1869 | | |
1869 | | - | |
| 1870 | + | |
1870 | 1871 | | |
1871 | 1872 | | |
1872 | 1873 | | |
| |||
1892 | 1893 | | |
1893 | 1894 | | |
1894 | 1895 | | |
1895 | | - | |
| 1896 | + | |
1896 | 1897 | | |
1897 | 1898 | | |
1898 | 1899 | | |
| |||
1903 | 1904 | | |
1904 | 1905 | | |
1905 | 1906 | | |
1906 | | - | |
| 1907 | + | |
| 1908 | + | |
1907 | 1909 | | |
1908 | 1910 | | |
1909 | 1911 | | |
1910 | 1912 | | |
1911 | 1913 | | |
1912 | 1914 | | |
1913 | 1915 | | |
1914 | | - | |
| 1916 | + | |
1915 | 1917 | | |
1916 | 1918 | | |
1917 | 1919 | | |
| |||
0 commit comments