erofs: surround fault_injection ralted option parsing using CONFIG_EROFS_FAULT_INJECTION
PATCH v2 1/1 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.
---v1->v2:
- modify warning message.
drivers/staging/erofs/super.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-)
drivers/staging/erofs/super.c +5 -3
@@ -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);
Signature · 1 line
2.17.1
PATCH v2 1/1 erofs: surround fault_injection ralted option parsing using CONFIG_EROFS_FAULT_INJECTION
Quoted 8 lines · Chengguang Xu
It's a little bit strange when
fault_injectionrelated option fail with-EINVALwhich was already disabled from config, so surround allfault_injectionrelated option parsing code usingCONFIG_EROFS_FAULT_INJECTION. Meanwhile, slightly change warning message to keep consistency with optionPOSIX_ACLandFS_XATTR.Signed-off-by Chengguang Xu <cgxu519 at gmx.com>
Prefix of patch title should be "staging: erofs: " as Xiang pointed out, otherwise it looks good to me, you can add:
Thanks,