提交 c39747f7 编写于 作者: G Gao Xiang 提交者: Greg Kroah-Hartman

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: NChristoph Hellwig <hch@infradead.org>
Signed-off-by: NGao Xiang <gaoxiang25@huawei.com>
Link: https://lore.kernel.org/r/20190904020912.63925-6-gaoxiang25@huawei.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 ed34aa4a
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册