Skip to content
  • Miklos Szeredi's avatar
    708fa015
    ovl: allow upperdir inside lowerdir · 708fa015
    Miklos Szeredi authored
    
    
    Commit 146d62e5 ("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: 146d62e5 ("ovl: detect overlapping layers")
    Cc: <stable@vger.kernel.org> # v5.2
    Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
    708fa015
    ovl: allow upperdir inside lowerdir
    Miklos Szeredi authored
    
    
    Commit 146d62e5 ("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: 146d62e5 ("ovl: detect overlapping layers")
    Cc: <stable@vger.kernel.org> # v5.2
    Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
Loading