ceph_fill_trace(): don't bother with d_instantiate(dn, NULL)
authorAl Viro <viro@zeniv.linux.org.uk>
Mon, 7 Mar 2016 20:11:43 +0000 (15:11 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 14 Mar 2016 04:16:06 +0000 (00:16 -0400)
... and use d_add(dn, NULL) in case we need to hash a negative
unhashed rather than using d_rehash() directly.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/ceph/inode.c

index 05dd66fe23a2892ec5cf0e433b7d206fdba3edb4..be2d87f33177d8252b8f1cb7a3db111332426b76 100644 (file)
@@ -1236,10 +1236,8 @@ retry_lookup:
                                dout("d_delete %p\n", dn);
                                d_delete(dn);
                        } else {
-                               dout("d_instantiate %p NULL\n", dn);
-                               d_instantiate(dn, NULL);
                                if (have_lease && d_unhashed(dn))
-                                       d_rehash(dn);
+                                       d_add(dn, NULL);
                                update_dentry_lease(dn, rinfo->dlease,
                                                    session,
                                                    req->r_request_started);