[PATCH 05/21] erofs: update erofs_inode_is_data_compressed helper

Christoph Hellwig hch at infradead.org
Mon Sep 2 22:07:44 AEST 2019


On Sun, Sep 01, 2019 at 01:51:14PM +0800, Gao Xiang wrote:
> From: Gao Xiang <gaoxiang25 at huawei.com>
> 
> 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.

Well, if you do check one field for two values it really helps to do
the same style of check for both.  All your choice how you do the check,
but don't mix multiple styles..

So this looks good.


More information about the Linux-erofs mailing list