]> git.baikalelectronics.ru Git - kernel.git/commit
erofs: update erofs_inode_is_data_compressed helper
authorGao Xiang <gaoxiang25@huawei.com>
Wed, 4 Sep 2019 02:08:52 +0000 (10:08 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 5 Sep 2019 18:10:07 +0000 (20:10 +0200)
commit0007776070c05223ec3a3b551abbf2380bc93ff9
tree7daa52996261362141f832109069934b128362a2
parentaf10cbb3a0f8daa3781ca9b8631d8bff3819e7be
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>
fs/erofs/erofs_fs.h