On Wed, Mar 07, 2012 at 06:05:40PM +0100, Jan Kara wrote: > Commit 250df6ed removed wake_up_inode() (in particular a memory barrier before > wake_up_bit()) on the basis that i_state transitions are protected by i_lock. > That would be fine if all the readers of i_state were using i_lock as well. But > wait_on_inode() doesn't use i_lock and thus the following can happen due to > reordering: > > CPU 1 CPU 2 > unlock_new_inode() > spin_lock(&inode->i_lock); > wake_up_bit(&inode->i_state, __I_NEW); > wait_on_inode() > wait_on_bit(&inode->i_state, __I_NEW); > inode->i_state &= ~I_NEW; > ^^^ this store was reordered > spin_unlock(&inode->i_lock); > > And waiter on CPU2 sleeps forever (or for a really long time). > > We fix the issue by using i_lock in wait_on_inode() in the spirit of commit > 250df6ed. Applied (along with a bunch of other stuff; will push to Linus tomorrow) -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html