@@ -943,26 +943,14 @@ static int erofs_show_options(struct seq_file *seq, struct dentry *root)
943
943
struct erofs_sb_info * sbi = EROFS_SB (root -> d_sb );
944
944
struct erofs_mount_opts * opt = & sbi -> opt ;
945
945
946
- #ifdef CONFIG_EROFS_FS_XATTR
947
- if (test_opt (opt , XATTR_USER ))
948
- seq_puts (seq , ",user_xattr" );
949
- else
950
- seq_puts (seq , ",nouser_xattr" );
951
- #endif
952
- #ifdef CONFIG_EROFS_FS_POSIX_ACL
953
- if (test_opt (opt , POSIX_ACL ))
954
- seq_puts (seq , ",acl" );
955
- else
956
- seq_puts (seq , ",noacl" );
957
- #endif
958
- #ifdef CONFIG_EROFS_FS_ZIP
959
- if (opt -> cache_strategy == EROFS_ZIP_CACHE_DISABLED )
960
- seq_puts (seq , ",cache_strategy=disabled" );
961
- else if (opt -> cache_strategy == EROFS_ZIP_CACHE_READAHEAD )
962
- seq_puts (seq , ",cache_strategy=readahead" );
963
- else if (opt -> cache_strategy == EROFS_ZIP_CACHE_READAROUND )
964
- seq_puts (seq , ",cache_strategy=readaround" );
965
- #endif
946
+ if (IS_ENABLED (CONFIG_EROFS_FS_XATTR ))
947
+ seq_puts (seq , test_opt (opt , XATTR_USER ) ?
948
+ ",user_xattr" : ",nouser_xattr" );
949
+ if (IS_ENABLED (CONFIG_EROFS_FS_POSIX_ACL ))
950
+ seq_puts (seq , test_opt (opt , POSIX_ACL ) ? ",acl" : ",noacl" );
951
+ if (IS_ENABLED (CONFIG_EROFS_FS_ZIP ))
952
+ seq_printf (seq , ",cache_strategy=%s" ,
953
+ erofs_param_cache_strategy [opt -> cache_strategy ].name );
966
954
if (test_opt (opt , DAX_ALWAYS ))
967
955
seq_puts (seq , ",dax=always" );
968
956
if (test_opt (opt , DAX_NEVER ))
0 commit comments