Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp640499ybi; Wed, 19 Jun 2019 05:33:00 -0700 (PDT) X-Google-Smtp-Source: APXvYqznC+zVoziS1WfUfbsoLLNCisuyomFZx5857yf+pS2Uh4dVyFJaSNtoEq5QTEWpeeScL9di X-Received: by 2002:a17:90a:9f0b:: with SMTP id n11mr10685206pjp.98.1560947580764; Wed, 19 Jun 2019 05:33:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560947580; cv=none; d=google.com; s=arc-20160816; b=kdTiq3qrWGUcZxDDOLIWywjKHP5T9PpNtKNll/VTR6+hbD5lDbIXSIS89GVUimNgjY /EhId1YMMmI+u+LI4TYZKy8dtaEchwcIt3HQXnPW7/cf3pWKX5eaOwQWUnMAOCaRgVb5 01I95lV/X+hDAgPoP28lnlvZ/3pjxNCDDNRhncv5gjuxALinca2d+td004nvsdteZqUQ DW4PLZNjGKTjFur0/WKG6ofNkY1eGOZsY+xCsanRyIJc8vgmR9M20iyZ5CDH4oSkhr23 3SjMKXYcuphc0wM17cGmPDtezdPWqODeR09mJu9eoYg8bODR8xM/zlCcB+KNBtEsAcjl VAuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=Mkwu/3OEXZGqXJyUnO5ri3H818oiUy7gpX5xDSptxL0=; b=pU8weKcratJGrigWM1t6eyGU9dg6ATYPg+qAjBaP5qtaDoTsQvlucrvWa0S3ACpklF host7EVNqRLeZrDf3KPsYQHZBsG7EtYbUCSB0k2TcM5zw7PxPiyyD4OiQ1v2cnHsf/d5 Ov5Wf55wSMv6JvX8XlIFMHNs0p99ev72TicSBxM6MGjiTj8S3ZyliMpSlCZN/MTn5Kwv Mv5KxvoKYBNHAJGGbqqYL0wIZaxY1erisRbdViGPMD9wu8NkmQvxd1L4VeTahURF7iaD QdakGhw7uj3h95/vRxeTvXW90Z2OYsFqQgh8s2Aiv+mC8rLC/p1iTxezz2aW+9S1UTUe 14VA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b3si3218150pgn.324.2019.06.19.05.32.44; Wed, 19 Jun 2019 05:33:00 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731818AbfFSMcC (ORCPT + 99 others); Wed, 19 Jun 2019 08:32:02 -0400 Received: from mail-wm1-f65.google.com ([209.85.128.65]:56134 "EHLO mail-wm1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731358AbfFSMac (ORCPT ); Wed, 19 Jun 2019 08:30:32 -0400 Received: by mail-wm1-f65.google.com with SMTP id a15so1577032wmj.5 for ; Wed, 19 Jun 2019 05:30:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Mkwu/3OEXZGqXJyUnO5ri3H818oiUy7gpX5xDSptxL0=; b=Q27OpdFTv4OWEaErbuPdxhUVWomuu9rBb3nD7NAhywbWerg8Ks8VUea8igQYDmgcQ9 +b3MbHkZaEJmyfvmJKYpSx9RgLxAsHCV1EC42ie/DdmwdCPM0A8KJZv1o3mV6RslsuQP 11vPVG0EiwAvhme4hP1YQn5iaEDvia3eDv8Pff+lezd1vjPqYfQtcdTKhTtUwiWPTITX PwVJndxxD9Rb7Ws/EOsChDZztzPky/LutonUNPjcEofhAiDV8CR77zrImn/kF78eKsNW EJDIaFjPg/bgM94fANBIchpkx09PvcYUtBnF7Gp6Iq2nUqzq8I5fOPcUE5U5+0wfPYnJ rBtg== X-Gm-Message-State: APjAAAX+QRerCva43DCxEJcbd1Q/W+uWp3iQO1LevMH7AHv7pGL7clKR s8Xy+D6MC8Wg5YfID2H4YkZ0Mw== X-Received: by 2002:a1c:7d56:: with SMTP id y83mr8459959wmc.77.1560947431788; Wed, 19 Jun 2019 05:30:31 -0700 (PDT) Received: from miu.piliscsaba.redhat.com (catv-212-96-48-140.catv.broadband.hu. [212.96.48.140]) by smtp.gmail.com with ESMTPSA id 11sm1837513wmd.23.2019.06.19.05.30.30 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Wed, 19 Jun 2019 05:30:31 -0700 (PDT) From: Miklos Szeredi To: David Howells Cc: Al Viro , Ian Kent , linux-api@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 05/13] vfs: don't parse "silent" option Date: Wed, 19 Jun 2019 14:30:11 +0200 Message-Id: <20190619123019.30032-5-mszeredi@redhat.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190619123019.30032-1-mszeredi@redhat.com> References: <20190619123019.30032-1-mszeredi@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org While this is a standard option as documented in mount(8), it is ignored by most filesystems. So reject, unless filesystem explicitly wants to handle it. The exception is unconverted filesystems, where it is unknown if the filesystem handles this or not. Any implementation, such as mount(8) that needs to parse this option without failing should simply ignore the return value from fsconfig(). Signed-off-by: Miklos Szeredi --- fs/fs_context.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/fs/fs_context.c b/fs/fs_context.c index 49636e541293..c26b353aa858 100644 --- a/fs/fs_context.c +++ b/fs/fs_context.c @@ -51,7 +51,6 @@ static const struct constant_table common_clear_sb_flag[] = { { "nolazytime", SB_LAZYTIME }, { "nomand", SB_MANDLOCK }, { "rw", SB_RDONLY }, - { "silent", SB_SILENT }, }; /* @@ -535,6 +534,9 @@ static int legacy_parse_param(struct fs_context *fc, struct fs_parameter *param) if (ret != -ENOPARAM) return ret; + if (strcmp(param->key, "silent") == 0) + fc->sb_flags |= SB_SILENT; + if (strcmp(param->key, "source") == 0) { if (param->type != fs_value_is_string) return invalf(fc, "VFS: Legacy: Non-string source"); -- 2.21.0