summaryrefslogtreecommitdiff
path: root/fs/erofs
diff options
context:
space:
mode:
authorGao Xiang <gaoxiang25@huawei.com>2019-09-04 05:08:52 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-09-05 21:10:07 +0300
commitc39747f770bee2060dc2409e52168a879978c467 (patch)
tree7daa52996261362141f832109069934b128362a2 /fs/erofs
parented34aa4a8a7d41ce0a160ccec0fd4f6b44a79c15 (diff)
downloadlinux-c39747f770bee2060dc2409e52168a879978c467.tar.xz
erofs: update erofs_inode_is_data_compressed helper
As Christoph said, "This looks like a really obsfucated way to write: return datamode == EROFS_INODE_FLAT_COMPRESSION || datamode == EROFS_INODE_FLAT_COMPRESSION_LEGACY; " Although I had my own consideration, it's the right way for now. [1] https://lore.kernel.org/r/20190829095954.GB20598@infradead.org/ Reported-by: Christoph Hellwig <hch@infradead.org> Signed-off-by: Gao Xiang <gaoxiang25@huawei.com> Link: https://lore.kernel.org/r/20190904020912.63925-6-gaoxiang25@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/erofs')
-rw-r--r--fs/erofs/erofs_fs.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/fs/erofs/erofs_fs.h b/fs/erofs/erofs_fs.h
index 59dcc2e8cb02..87d7ae82339a 100644
--- a/fs/erofs/erofs_fs.h
+++ b/fs/erofs/erofs_fs.h
@@ -62,9 +62,8 @@ enum {
static inline bool erofs_inode_is_data_compressed(unsigned int datamode)
{
- if (datamode == EROFS_INODE_FLAT_COMPRESSION)
- return true;
- return datamode == EROFS_INODE_FLAT_COMPRESSION_LEGACY;
+ return datamode == EROFS_INODE_FLAT_COMPRESSION ||
+ datamode == EROFS_INODE_FLAT_COMPRESSION_LEGACY;
}
/* bit definitions of inode i_advise */