linux-next: manual merge of the vfs tree with the vfs-brauner tree
Hi all,
Today's linux-next merge of the vfs tree got a conflict in:
fs/dcache.c
between commits:
31e332b911fc ("fs: add missing fences to I_NEW handling") b4dbfd8653b3 ("Coccinelle-based conversion to use ->i_state accessors") 1e3c3784221a ("fs: rework I_NEW handling to operate without fences")
from the vfs-brauner tree and commit:
bacdf1d70bbe ("primitives for maintaining persisitency")
from the vfs tree.
I fixed it up (see below) and can carry the fix as necessary. This is now fixed as far as linux-next is concerned, but any non trivial conflicts should be mentioned to your upstream maintainer when your tree is submitted for merging. You may also want to consider cooperating with the maintainer of the conflicting tree to minimise any particularly complex conflicts.
Signature · 27 lines
Cheers, Stephen Rothwell diff --cc fs/dcache.c index 3204cc55b566,824d620bb563..000000000000 --- a/fs/dcache.c +++ b/fs/dcache.c @@@ -1986,9 -2012,17 +2019,11 @@@ void d_instantiate_new(struct dentry *e lockdep_annotate_inode_mutex_key(inode); security_d_instantiate(entry, inode); spin_lock(&inode->i_lock); + spin_lock(&entry->d_lock); __d_instantiate(entry, inode); + spin_unlock(&entry->d_lock); - WARN_ON(!(inode->i_state & I_NEW)); - inode->i_state &= ~I_NEW & ~I_CREATING; - /* - * Pairs with the barrier in prepare_to_wait_event() to make sure - * ___wait_var_event() either sees the bit cleared or - * waitqueue_active() check in wake_up_var() sees the waiter. - */ - smp_mb(); + WARN_ON(!(inode_state_read(inode) & I_NEW)); + inode_state_clear(inode, I_NEW | I_CREATING); inode_wake_up_bit(inode, __I_NEW); spin_unlock(&inode->i_lock); }