ovl: honor flag MS_SILENT at mount

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 <khlebnikov@yandex-team.ru>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
This commit is contained in:
Konstantin Khlebnikov 2015-06-29 20:18:56 +03:00 committed by Miklos Szeredi
parent 11f3710417
commit 07f2af7bfd
1 changed files with 2 additions and 1 deletions

View File

@ -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;
}