From patchwork Mon Jun 29 17:18:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konstantin Khlebnikov X-Patchwork-Id: 6690451 Return-Path: X-Original-To: patchwork-linux-fsdevel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 574C79F380 for ; Mon, 29 Jun 2015 17:27:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 7D361205BE for ; Mon, 29 Jun 2015 17:27:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 978A0205BD for ; Mon, 29 Jun 2015 17:27:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751612AbbF2R1K (ORCPT ); Mon, 29 Jun 2015 13:27:10 -0400 Received: from forward-corp1o.mail.yandex.net ([37.140.190.172]:40428 "EHLO forward-corp1o.mail.yandex.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751850AbbF2R1I (ORCPT ); Mon, 29 Jun 2015 13:27:08 -0400 X-Greylist: delayed 487 seconds by postgrey-1.27 at vger.kernel.org; Mon, 29 Jun 2015 13:27:07 EDT Received: from smtpcorp1m.mail.yandex.net (smtpcorp1m.mail.yandex.net [77.88.61.150]) by forward-corp1o.mail.yandex.net (Yandex) with ESMTP id 41A063920C21; Mon, 29 Jun 2015 21:18:57 +0400 (MSK) Received: from smtpcorp1m.mail.yandex.net (localhost [127.0.0.1]) by smtpcorp1m.mail.yandex.net (Yandex) with ESMTP id EC5EF2CA0341; Mon, 29 Jun 2015 20:18:56 +0300 (MSK) Received: from unknown (unknown [2a02:6b8:0:408:5c4e:c25f:503e:96d8]) by smtpcorp1m.mail.yandex.net (nwsmtp/Yandex) with ESMTPSA id 8dhnSiA2aX-IuXqCNio; Mon, 29 Jun 2015 20:18:56 +0300 (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (Client certificate not present) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex-team.ru; s=default; t=1435598336; bh=UCYm4vYQqoM+J6r++oRYE+wE4wMDV9/KAWXIq/RWZCQ=; h=Subject:From:To:Cc:Date:Message-ID:User-Agent:MIME-Version: Content-Type:Content-Transfer-Encoding; b=oQjB6woj4EqwKgzFTRkblcRRRNNYDvb4Za+F3VIQ6JIj3n0SqlbYAKDFKMAiwsUOL LTPNMizH+5OzHYjeGMWi96kMU+Rv0F+uuedWhNjcgYlQ89h6oJiVtyF/hI8YaE/NwY 6qVli1TtVTmDoAFRM5TjoRyMWeFbnUL6HNgRNDOQ= Authentication-Results: smtpcorp1m.mail.yandex.net; dkim=pass header.i=@yandex-team.ru Subject: [PATCH 1/4] ovl: honor flag MS_SILENT at mount From: Konstantin Khlebnikov To: linux-fsdevel@vger.kernel.org, Miklos Szeredi , linux-kernel@vger.kernel.org, Alexander Viro , linux-unionfs@vger.kernel.org Cc: linux-security-module@vger.kernel.org Date: Mon, 29 Jun 2015 20:18:56 +0300 Message-ID: <20150629171856.15730.58271.stgit@buzz> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Spam-Status: No, score=-7.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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 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; }