]> git.baikalelectronics.ru Git - kernel.git/commit
cramfs: fix usage on non-MTD device
authorMaxime Bizon <mbizon@freebox.fr>
Sat, 19 Oct 2019 19:24:11 +0000 (15:24 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 24 Nov 2019 02:44:49 +0000 (21:44 -0500)
commit301891fbac7d3011ad25520e0130e3ea5a20aec1
treee83a41bef7958413989992a1a836166d35b63763
parent3a4b05bad6c54f7c7663ed78c837e3d5e04a6bbc
cramfs: fix usage on non-MTD device

When both CONFIG_CRAMFS_MTD and CONFIG_CRAMFS_BLOCKDEV are enabled, if
we fail to mount on MTD, we don't try on block device.

Note: this relies upon cramfs_mtd_fill_super() leaving no side
effects on fc state in case of failure; in general, failing
get_tree_...() does *not* mean "fine to try again"; e.g. parsed
options might've been consumed by fill_super callback and freed
on failure.

Fixes: e0345870b3e3 ("vfs: Convert cramfs to use the new mount API")
Signed-off-by: Maxime Bizon <mbizon@freebox.fr>
Signed-off-by: Nicolas Pitre <nico@fluxnic.net>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/cramfs/inode.c