file_systems: Overlay layers only support being mounted with super volumes.

Fixes #16669.
This commit is contained in:
Augustin Cavalier
2025-09-03 16:39:34 -04:00
parent 92209b9023
commit 2199532364
3 changed files with 9 additions and 0 deletions
@@ -1994,6 +1994,9 @@ static status_t
overlay_mount(fs_volume *volume, const char *device, uint32 flags,
const char *args, ino_t *rootID)
{
if (volume->super_volume == NULL)
return B_UNSUPPORTED;
TRACE_VOLUME("mounting attribute overlay\n");
volume->private_volume = new(std::nothrow) OverlayVolume(volume);
if (volume->private_volume == NULL)
@@ -1106,6 +1106,9 @@ static status_t
overlay_mount(fs_volume *volume, const char *device, uint32 flags,
const char *args, ino_t *rootID)
{
if (volume->super_volume == NULL)
return B_UNSUPPORTED;
char filename[256];
snprintf(filename, sizeof(filename), "%s%s", kLogFilePrefix, device);
filename[sizeof(filename) - 1] = 0;
@@ -2557,6 +2557,9 @@ static status_t
overlay_mount(fs_volume *volume, const char *device, uint32 flags,
const char *args, ino_t *rootID)
{
if (volume->super_volume == NULL)
return B_UNSUPPORTED;
TRACE_VOLUME("mounting write overlay\n");
volume->private_volume = new(std::nothrow) OverlayVolume(volume);
if (volume->private_volume == NULL)