Message ID | 20150629171856.15730.58271.stgit@buzz (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Mon, Jun 29, 2015 at 7:18 PM, Konstantin Khlebnikov <khlebnikov@yandex-team.ru> wrote: > 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. Queued. Thanks, Miklos -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c index bf8537c7f455..00e1d0b3abdd 100644 --- a/fs/overlayfs/super.c +++ b/fs/overlayfs/super.c @@ -840,7 +840,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; }
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> --- fs/overlayfs/super.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html