Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp2127105ybn; Thu, 26 Sep 2019 07:25:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqw2AnQf9pcVtM4+68JW5WW2wn1K+O2JPDt47hLx7M/sKdGy+56yNfIbRSRuxDS3ebBv8RVH X-Received: by 2002:a17:906:3286:: with SMTP id 6mr3339903ejw.37.1569507928044; Thu, 26 Sep 2019 07:25:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569507928; cv=none; d=google.com; s=arc-20160816; b=nae+JNuNE0214XEL7pcEU/a6T1xgI/3QV6GGPeL1VqVcIu8fw2RKGumuU0Ipe74az5 QPsw6xGlyYRc+7ERyUw5GAyhGWRhbrBpSpAVfh4wSfoY7Z+j7aPNqt5lz8K5fUz5m1pG qUcOuoTd+yJp9H92EeuQSwixa8PZIPOdqaB+fVuvxKHuOnIi4BVl1a3F9lV7MmxbpBd4 MX/FeQddeo7rCHyE483Hz5o4I8GsrhNrMKYdT51tdqghHYxnFmgMnZGmaW6gQBBwVr8x lObPqFbLja5L53doFS0MU32J1wxV45U40fIqAVUExZ/EHa5y1vn347zXaeFC0aXv6B8E X4/g== 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 :user-agent:message-id:date:cc:to:from:subject:organization; bh=E8LqrCqLtxVauTHpE3y+8N9MNK+3rkQWQEFXyk8vVGo=; b=rD7MyQ27uNik1y1gDzzLxyJGVHbRn8+uZ2VIchTUNF/XCmSUOA73UnnYu5WoCWZ7zY c82mDfSUhvr6/vsN18As+YaJyt4x6gIcLyma8Pn2PStqWqnjccJC9et0uGYCqJo6iHMF o4N3TneutNhxS6n2/FA6fmtjTZQs14GRpooJWnraiav1ZAbTHqp8YHAKI7hcJIm7zwnU qJrwOc/Z6lspMf+uVN7PJr32vSVV4hjSwQcnH2y+ZY4jtD9/edzJRMFK+rhO1STPEhbS /wrNmMbXPNb76wX7Rqwy+AXjFRyMnfoe4DyWlDYKy4VYLZY0vL6p1OgUwQqjhtpC/K0o 9ccQ== 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 d27si1501009ede.381.2019.09.26.07.25.03; Thu, 26 Sep 2019 07:25:28 -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 S1727128AbfIZOVW (ORCPT + 99 others); Thu, 26 Sep 2019 10:21:22 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44312 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726500AbfIZOVV (ORCPT ); Thu, 26 Sep 2019 10:21:21 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 63B3410CC207; Thu, 26 Sep 2019 14:21:21 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-125-72.rdu2.redhat.com [10.10.125.72]) by smtp.corp.redhat.com (Postfix) with ESMTP id D1A1360C44; Thu, 26 Sep 2019 14:21:19 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 Subject: [PATCH] jffs2: Fix mounting under new mount API From: David Howells To: dwmw2@infradead.org, richard@nod.at Cc: Al Viro , linux-mtd@lists.infradead.org, dhowells@redhat.com, viro@zeniv.linux.org.uk, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Date: Thu, 26 Sep 2019 15:21:18 +0100 Message-ID: <156950767876.30879.17024491763471689960.stgit@warthog.procyon.org.uk> User-Agent: StGit/unknown-version MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.6.2 (mx1.redhat.com [10.5.110.65]); Thu, 26 Sep 2019 14:21:21 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The mounting of jffs2 is broken due to the changes from the new mount API because it specifies a "source" operation, but then doesn't actually process it. But because it specified it, it doesn't return -ENOPARAM and the caller doesn't process it either and the source gets lost. Fix this by simply removing the source parameter from jffs2 and letting the VFS deal with it in the default manner. To test it, enable CONFIG_MTD_MTDRAM and allow the default size and erase block size parameters, then try and mount the /dev/mtdblock file that that creates as jffs2. No need to initialise it. Fixes: ec10a24f10c8 ("vfs: Convert jffs2 to use the new mount API") Reported-by: Al Viro Signed-off-by: David Howells cc: David Woodhouse cc: Richard Weinberger cc: linux-mtd@lists.infradead.org --- fs/jffs2/super.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c index cbe70637c117..0e6406c4f362 100644 --- a/fs/jffs2/super.c +++ b/fs/jffs2/super.c @@ -163,13 +163,11 @@ static const struct export_operations jffs2_export_ops = { * Opt_rp_size: size of reserved pool in KiB */ enum { - Opt_source, Opt_override_compr, Opt_rp_size, }; static const struct fs_parameter_spec jffs2_param_specs[] = { - fsparam_string ("source", Opt_source), fsparam_enum ("compr", Opt_override_compr), fsparam_u32 ("rp_size", Opt_rp_size), {}