diff options
author | Konstantin Khlebnikov <khlebnikov@yandex-team.ru> | 2015-06-29 20:18:56 +0300 |
---|---|---|
committer | Miklos Szeredi <miklos@szeredi.hu> | 2016-03-21 17:31:45 +0100 |
commit | 07f2af7bfd247857b1bf16ae7f479b5b6f4ef305 (patch) | |
tree | ae5fa02390d6da56108791ea3d210ab7695aa7c3 /fs | |
parent | 11f3710417d026ea2f4fcf362d866342c5274185 (diff) |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/overlayfs/super.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index 619ad4b016d2..6b0111ae2ceb 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@ -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; } |