Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/sage/ceph...
[cascardo/linux.git] / fs / ceph / inode.c
index 0bdabd1..f61a741 100644 (file)
@@ -986,7 +986,7 @@ static struct dentry *splice_dentry(struct dentry *dn, struct inode *in,
        /* dn must be unhashed */
        if (!d_unhashed(dn))
                d_drop(dn);
-       realdn = d_materialise_unique(dn, in);
+       realdn = d_splice_alias(in, dn);
        if (IS_ERR(realdn)) {
                pr_err("splice_dentry error %ld %p inode %p ino %llx.%llx\n",
                       PTR_ERR(realdn), dn, in, ceph_vinop(in));
@@ -1206,20 +1206,18 @@ retry_lookup:
                        struct inode *olddir = req->r_old_dentry_dir;
                        BUG_ON(!olddir);
 
-                       dout(" src %p '%.*s' dst %p '%.*s'\n",
+                       dout(" src %p '%pd' dst %p '%pd'\n",
                             req->r_old_dentry,
-                            req->r_old_dentry->d_name.len,
-                            req->r_old_dentry->d_name.name,
-                            dn, dn->d_name.len, dn->d_name.name);
+                            req->r_old_dentry,
+                            dn, dn);
                        dout("fill_trace doing d_move %p -> %p\n",
                             req->r_old_dentry, dn);
 
                        d_move(req->r_old_dentry, dn);
-                       dout(" src %p '%.*s' dst %p '%.*s'\n",
+                       dout(" src %p '%pd' dst %p '%pd'\n",
+                            req->r_old_dentry,
                             req->r_old_dentry,
-                            req->r_old_dentry->d_name.len,
-                            req->r_old_dentry->d_name.name,
-                            dn, dn->d_name.len, dn->d_name.name);
+                            dn, dn);
 
                        /* ensure target dentry is invalidated, despite
                           rehashing bug in vfs_rename_dir */
@@ -1420,7 +1418,7 @@ retry_lookup:
                        /* reorder parent's d_subdirs */
                        spin_lock(&parent->d_lock);
                        spin_lock_nested(&dn->d_lock, DENTRY_D_LOCK_NESTED);
-                       list_move(&dn->d_u.d_child, &parent->d_subdirs);
+                       list_move(&dn->d_child, &parent->d_subdirs);
                        spin_unlock(&dn->d_lock);
                        spin_unlock(&parent->d_lock);
                }