Re: [RFC PATCH 5/6] ext4: Search for an inode to update under the RCU lock if we can

From: Al Viro
Date: Thu Apr 18 2019 - 11:08:45 EST


On Thu, Apr 18, 2019 at 03:06:44PM +0100, David Howells wrote:
> + inode = find_inode_by_ino_rcu(sb, ino);
> + if (!inode)
> + return;
>
> if ((inode->i_ino != ino) ||
> (inode->i_state & (I_FREEING | I_WILL_FREE | I_NEW |
> I_DIRTY_INODE)) ||
> ((inode->i_state & I_DIRTY_TIME) == 0))

Umm... The situation with memory barriers here needs to be documented,
IMO. And I'm not sure if the thing is actually correct...