# Re: \[PATCH v2 11/12\] ext4: simplify i\_state checks in \_\_ext4\_update\_other\_inode\_time()

- From: Christoph Hellwig \<hch@lst.de\>
- Date: 2021-01-11 10:54:26 
- List: linux-xfs
- Page: https://ratatoskr.run/linux-xfs/2021/01/196989
- Thread: https://ratatoskr.run/linux-fsdevel/2021/01/196913/t.md

```text
On Fri, Jan 08, 2021 at 11:59:02PM -0800, Eric Biggers wrote:
>  	if ((inode->i_state & (I_FREEING | I_WILL_FREE | I_NEW |
> -			       I_DIRTY_INODE)) ||
> -	    ((inode->i_state & I_DIRTY_TIME) == 0))
> +			       I_DIRTY_TIME)) != I_DIRTY_TIME)
>  		return;
>  
>  	spin_lock(&inode->i_lock);
> -	if (((inode->i_state & (I_FREEING | I_WILL_FREE | I_NEW |
> -				I_DIRTY_INODE)) == 0) &&
> -	    (inode->i_state & I_DIRTY_TIME)) {
> +	if ((inode->i_state & (I_FREEING | I_WILL_FREE | I_NEW |
> +			       I_DIRTY_TIME)) == I_DIRTY_TIME) {

I think a descriptively named inline helper in fs.h would really improve
this..
```
