linux-next: manual merge of the vfs tree with the overlayfs tree
Hi Al,
Today's linux-next merge of the vfs tree got a conflict in:
fs/dcache.c
between commit:
f9c34674bc60 ("vfs: factor out helpers d_instantiate_anon() and d_alloc_anon()")
from the overlayfs tree and commit:
f1ee616214cb ("VFS: don't keep disconnected dentries on d_anon")
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 · 37 lines
Cheers,
Stephen Rothwell
diff --cc fs/dcache.c
index 99bce0ed0213,17e6b84b9656..000000000000
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@@ -1954,16 -1961,18 +1953,18 @@@ static struct dentry *__d_instantiate_a
if (disconnected)
add_flags |= DCACHE_DISCONNECTED;
- spin_lock(&tmp->d_lock);
- __d_set_inode_and_type(tmp, inode, add_flags);
- hlist_add_head(&tmp->d_u.d_alias, &inode->i_dentry);
+ spin_lock(&dentry->d_lock);
+ __d_set_inode_and_type(dentry, inode, add_flags);
+ hlist_add_head(&dentry->d_u.d_alias, &inode->i_dentry);
- hlist_bl_lock(&dentry->d_sb->s_anon);
- hlist_bl_add_head(&dentry->d_hash, &dentry->d_sb->s_anon);
- hlist_bl_unlock(&dentry->d_sb->s_anon);
+ if (!disconnected) {
- hlist_bl_lock(&tmp->d_sb->s_roots);
- hlist_bl_add_head(&tmp->d_hash, &tmp->d_sb->s_roots);
- hlist_bl_unlock(&tmp->d_sb->s_roots);
++ hlist_bl_lock(&dentry->d_sb->s_roots);
++ hlist_bl_add_head(&dentry->d_hash, &tmp->d_sb->s_roots);
++ hlist_bl_unlock(&dentry->d_sb->s_roots);
+ }
- spin_unlock(&tmp->d_lock);
+ spin_unlock(&dentry->d_lock);
spin_unlock(&inode->i_lock);
- return tmp;
+ return dentry;
out_iput:
iput(inode);Hi all,
Review
Quoted 7 lines · On Thu, 25 Jan 2018 14:31:55 +1100 Stephen Rothwell <[email protected]>…
(quoted diff) +3
-0+ if (!disconnected) { - hlist_bl_lock(&tmp->d_sb->s_roots); - hlist_bl_add_head(&tmp->d_hash, &tmp->d_sb->s_roots); - hlist_bl_unlock(&tmp->d_sb->s_roots); ++ hlist_bl_lock(&dentry->d_sb->s_roots); ++ hlist_bl_add_head(&dentry->d_hash, &tmp->d_sb->s_roots);
I fixed up the "tmp" here ... it should have been "dentry".
Signature · 2 lines
Cheers, Stephen Rothwell
Hi all,
Quoted 50 lines · On Thu, 25 Jan 2018 14:31:55 +1100 Stephen Rothwell <[email protected]>…
Today's linux-next merge of the vfs tree got a conflict in:
fs/dcache.cbetween commit:
f9c34674bc60("vfs: factor out helpersd_instantiate_anon()andd_alloc_anon()")from the overlayfs tree and commit:
f1ee616214cb("VFS: don't keep disconnected dentries ond_anon")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 · 2 lines
Cheers, Stephen Rothwellfs/dcache.c +4
-3@@@ -1954,16 -1961,18 +1953,18 @@@ static struct dentry *__d_instantiate_aif (disconnected) add_flags |=DCACHE_DISCONNECTED ; -spin_lock (&tmp->d_lock); -__d_set_inode_and_type (tmp, inode, add_flags); -hlist_add_head (&tmp->d_u.d_alias, &inode->i_dentry); +spin_lock (&dentry->d_lock); +__d_set_inode_and_type (dentry, inode, add_flags); +hlist_add_head (&dentry->d_u.d_alias, &inode->i_dentry); -hlist_bl_lock (&dentry->d_sb->s_anon); -hlist_bl_add_head (&dentry->d_hash, &dentry->d_sb->s_anon); -hlist_bl_unlock (&dentry->d_sb->s_anon); +if (!disconnected) { -hlist_bl_lock (&tmp->d_sb->s_roots); -hlist_bl_add_head (&tmp->d_hash, &tmp->d_sb->s_roots); -hlist_bl_unlock (&tmp->d_sb->s_roots); ++hlist_bl_lock (&dentry->d_sb->s_roots); ++hlist_bl_add_head (&dentry->d_hash, &tmp->d_sb->s_roots); ++hlist_bl_unlock (&dentry->d_sb->s_roots);
fs/dcache.c
Quoted 10 lines
fs/dcache.c +1
-0+ } -spin_unlock (&tmp->d_lock); +spin_unlock (&dentry->d_lock);spin_unlock (&inode->i_lock); - return tmp; + return dentry; out_iput:iput (inode);
This is now a conflict between the overlayfs tree and Linus' tree.
Signature · 2 lines
Cheers, Stephen Rothwell