From 07f2af7bfd247857b1bf16ae7f479b5b6f4ef305 Mon Sep 17 00:00:00 2001 From: Konstantin Khlebnikov Date: Mon, 29 Jun 2015 20:18:56 +0300 Subject: 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 Signed-off-by: Miklos Szeredi --- fs/overlayfs/super.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'fs/overlayfs') 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; } -- cgit v1.2.3