From: NeilBrown d_add() is being deprecated in favour of d_splice_alias() So replace all uses in cephfs. Signed-off-by: NeilBrown --- fs/ceph/dir.c | 4 ++-- fs/ceph/inode.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/ceph/dir.c b/fs/ceph/dir.c index 2e5c0ccb1b34..35c18020d0f4 100644 --- a/fs/ceph/dir.c +++ b/fs/ceph/dir.c @@ -779,7 +779,7 @@ struct dentry *ceph_finish_lookup(struct ceph_mds_request *req, d_inode(dentry->d_parent); if (!parent || ceph_snap(parent) == CEPH_NOSNAP) - d_add(dentry, NULL); + d_splice_alias(NULL, dentry); } } } @@ -853,7 +853,7 @@ static struct dentry *ceph_lookup(struct inode *dir, struct dentry *dentry, doutc(cl, " dir %llx.%llx complete, -ENOENT\n", ceph_vinop(dir)); if (d_unhashed(dentry)) - d_add(dentry, NULL); + d_splice_alias(NULL, dentry); di->lease_shared_gen = atomic_read(&ci->i_shared_gen); return NULL; } diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 01c468a509e2..07868fcfc6cc 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -1813,7 +1813,7 @@ int ceph_fill_trace(struct super_block *sb, struct ceph_mds_request *req) } else if (have_lease) { if (d_unhashed(dn) && ceph_snap(dir) == CEPH_NOSNAP) - d_add(dn, NULL); + d_splice_alias(NULL, dn); } if (!d_unhashed(dn) && have_lease) -- 2.50.0.107.gf914562f5916.dirty