From patchwork Tue Apr 11 09:50:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksij Rempel X-Patchwork-Id: 9674821 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 4BBF560383 for ; Tue, 11 Apr 2017 09:51:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 27BDF284BA for ; Tue, 11 Apr 2017 09:51:46 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1CC2D28534; Tue, 11 Apr 2017 09:51:46 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 986852852E for ; Tue, 11 Apr 2017 09:51:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753361AbdDKJva (ORCPT ); Tue, 11 Apr 2017 05:51:30 -0400 Received: from metis.ext.4.pengutronix.de ([92.198.50.35]:37149 "EHLO metis.ext.4.pengutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752610AbdDKJvN (ORCPT ); Tue, 11 Apr 2017 05:51:13 -0400 Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cxsS2-0002iC-3a; Tue, 11 Apr 2017 11:51:06 +0200 Received: from ore by dude.hi.pengutronix.de with local (Exim 4.88) (envelope-from ) id 1cxsS0-0008R1-Ce; Tue, 11 Apr 2017 11:51:04 +0200 From: Oleksij Rempel To: richard@nod.at, dedekind1@gmail.com, adrian.hunter@intel.com, linux-mtd@lists.infradead.org, linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Cc: Steffen Trumtrar , Oleksij Rempel Subject: [PATCH v2 1/3] fs: ubifs: parse iversion mount option Date: Tue, 11 Apr 2017 11:50:53 +0200 Message-Id: <20170411095055.26328-2-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170411095055.26328-1-o.rempel@pengutronix.de> References: <20170411095055.26328-1-o.rempel@pengutronix.de> X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-fsdevel@vger.kernel.org Sender: linux-fsdevel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Steffen Trumtrar this option is needed to make UBIFS work with IMA. Signed-off-by: Steffen Trumtrar Signed-off-by: Oleksij Rempel --- fs/ubifs/super.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index b73811bd7676..bff1e8d6f7bd 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c @@ -931,6 +931,7 @@ enum { Opt_chk_data_crc, Opt_no_chk_data_crc, Opt_override_compr, + Opt_i_version, Opt_err, }; @@ -942,6 +943,7 @@ static const match_table_t tokens = { {Opt_chk_data_crc, "chk_data_crc"}, {Opt_no_chk_data_crc, "no_chk_data_crc"}, {Opt_override_compr, "compr=%s"}, + {Opt_i_version, "i_version"}, {Opt_err, NULL}, }; @@ -986,6 +988,7 @@ static int ubifs_parse_options(struct ubifs_info *c, char *options, return 0; while ((p = strsep(&options, ","))) { + struct super_block *sb = c->vfs_sb; int token; if (!*p) @@ -1042,10 +1045,12 @@ static int ubifs_parse_options(struct ubifs_info *c, char *options, c->default_compr = c->mount_opts.compr_type; break; } + case Opt_i_version: + sb->s_flags |= MS_I_VERSION; + break; default: { unsigned long flag; - struct super_block *sb = c->vfs_sb; flag = parse_standard_option(p); if (!flag) {