Skip to content

Commit

Permalink
ovl: honor flag MS_SILENT at mount
Browse files Browse the repository at this point in the history
This patch hides error about missing lowerdir if MS_SILENT is set.

We use mount(NULL, "/", "overlay", MS_SILENT, NULL) for testing support of
overlayfs: syscall returns -ENODEV if it's not supported. Otherwise kernel
automatically loads module and returns -EINVAL because lowerdir is missing.

Signed-off-by: Konstantin Khlebnikov <[email protected]>
Signed-off-by: Miklos Szeredi <[email protected]>
  • Loading branch information
koct9i authored and szmi committed Mar 21, 2016
1 parent 11f3710 commit 07f2af7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/overlayfs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -936,7 +936,8 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent)

err = -EINVAL;
if (!ufs->config.lowerdir) {
pr_err("overlayfs: missing 'lowerdir'\n");
if (!silent)
pr_err("overlayfs: missing 'lowerdir'\n");
goto out_free_config;
}

Expand Down

0 comments on commit 07f2af7

Please sign in to comment.