From: David Howells Date: Thu, 26 Sep 2019 14:21:18 +0000 (+0100) Subject: jffs2: Fix mounting under new mount API X-Git-Tag: v5.4-rc3~32^2~2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a3bc18a48e2e678efe62f1f9989902f9cd19e0ff;p=platform%2Fkernel%2Flinux-rpi.git jffs2: Fix mounting under new mount API 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 Signed-off-by: Al Viro --- diff --git a/fs/jffs2/super.c b/fs/jffs2/super.c index cbe7063..0e6406c 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), {}