Repository navigation
Commit 27c1936
ovl: allow upperdir inside lowerdir
commit 708fa01 upstream.
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 71d5845 commit 27c1936
1 file changed
Lines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1759 | 1759 | | |
1760 | 1760 | | |
1761 | 1761 | | |
1762 | | - | |
| 1762 | + | |
| 1763 | + | |
1763 | 1764 | | |
1764 | 1765 | | |
1765 | 1766 | | |
| |||
1771 | 1772 | | |
1772 | 1773 | | |
1773 | 1774 | | |
1774 | | - | |
| 1775 | + | |
1775 | 1776 | | |
1776 | 1777 | | |
1777 | 1778 | | |
| |||
1797 | 1798 | | |
1798 | 1799 | | |
1799 | 1800 | | |
1800 | | - | |
| 1801 | + | |
1801 | 1802 | | |
1802 | 1803 | | |
1803 | 1804 | | |
| |||
1808 | 1809 | | |
1809 | 1810 | | |
1810 | 1811 | | |
1811 | | - | |
| 1812 | + | |
| 1813 | + | |
1812 | 1814 | | |
1813 | 1815 | | |
1814 | 1816 | | |
1815 | 1817 | | |
1816 | 1818 | | |
1817 | 1819 | | |
1818 | 1820 | | |
1819 | | - | |
| 1821 | + | |
1820 | 1822 | | |
1821 | 1823 | | |
1822 | 1824 | | |
| |||
0 commit comments