On 2020/2/5 11:08, Matthew Wilcox wrote: > On Wed, Feb 05, 2020 at 09:58:29AM +0800, Chao Yu wrote: >> On 2020/2/3 11:39, Matthew Wilcox wrote: >>> >>> Remove the horrendous ifdeffery by slipping an IS_ENABLED into >>> f2fs_compressed_file(). >> >> I'd like to suggest to use >> >> if (IS_ENABLED(CONFIG_F2FS_FS_COMPRESSION) && f2fs_compressed_file(inode)) >> >> here to clean up f2fs_readpages' codes. >> >> Otherwise, f2fs module w/o compression support will not recognize compressed >> file in most other cases if we add IS_ENABLED() condition into >> f2fs_compressed_file(). > > If we need to recognise them in order to deny access to them, then I > suppose we need two predicates. Perhaps: Yup, for compression feature, now we use f2fs_is_compress_backend_ready() to check whether current kernel can support to handle compressed file. For the purpose of cleanup, I guess below change should be enough... >> if (IS_ENABLED(CONFIG_F2FS_FS_COMPRESSION) && f2fs_compressed_file(inode)) Thanks, > > f2fs_unsupported_attributes(inode) > and > f2fs_compressed_file(inode) > > where f2fs_unsupported_attributes can NACK any set flag (including those > which don't exist yet), eg encrypted. That seems like a larger change > than I should be making, since I'm not really familiar with f2fs code. > . >