Re: [PATCH 17/18] fs: icache remove inode_lock

Christoph Hellwig
2010-10-15T17:52:58Z

Thanks for trying to get back to a technical discussion. Maybe we
can just move the technical comments to direct replies to the patches
and leave this not very helpful subthread behind?

> rcu_read_lock();
> list_for_each_entry(inode, list) {
> if (inode->blah ...) {
> spin_lock(&list_lock);
> if (unlikely(list_empty(&inode->i_list)))
> continue;
> do_something(inode);
> }
> }

But that't not what we do for icache. For the validity checking during
lookup we check the I_FREEING bit, which is modified under i_lock
and can be read without any locking. So everything is just fine
when moving on to RCU locking.