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

From: Christoph Hellwig
Date: Fri Oct 15 2010 - 13:53:01 EST


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.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/