diff options
author | Chengguang Xu <cgxu519@gmx.com> | 2018-09-11 02:51:54 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-09-14 10:05:03 +0300 |
commit | 064ee3c0da805b57d9a8dd55eff79887a8f78532 (patch) | |
tree | d4c7f6bed235abb584c38647e85f5638204dd624 /drivers | |
parent | 7dd68b147d60e5e1bcec53d0050246132dd7b9d6 (diff) | |
download | linux-064ee3c0da805b57d9a8dd55eff79887a8f78532.tar.xz |
staging: erofs: surround fault_injection ralted option parsing using CONFIG_EROFS_FAULT_INJECTION
It's a little bit strange when fault_injection related
option fail with -EINVAL which was already disabled
from config, so surround all fault_injection related option
parsing code using CONFIG_EROFS_FAULT_INJECTION. Meanwhile,
slightly change warning message to keep consistency with
option POSIX_ACL and FS_XATTR.
Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/erofs/super.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/staging/erofs/super.c b/drivers/staging/erofs/super.c index 5654cc7a5015..2109b037fa17 100644 --- a/drivers/staging/erofs/super.c +++ b/drivers/staging/erofs/super.c @@ -237,16 +237,18 @@ static int parse_options(struct super_block *sb, char *options) infoln("noacl options not supported"); break; #endif +#ifdef CONFIG_EROFS_FAULT_INJECTION case Opt_fault_injection: if (args->from && match_int(args, &arg)) return -EINVAL; -#ifdef CONFIG_EROFS_FAULT_INJECTION erofs_build_fault_attr(EROFS_SB(sb), arg); set_opt(EROFS_SB(sb), FAULT_INJECTION); + break; #else - infoln("FAULT_INJECTION was not selected"); -#endif + case Opt_fault_injection: + infoln("fault_injection options not supported"); break; +#endif default: errln("Unrecognized mount option \"%s\" " "or missing value", p); |