diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 8f9b9fe8ef9f4a84056c16289650d482a8c0c8ff..3582e79f46e0f8276c11186d034117dcc8116ae1 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -1199,8 +1199,10 @@ int ceph_readdir_prepopulate(struct ceph_mds_request *req, goto out; } err = ceph_init_dentry(dn); - if (err < 0) + if (err < 0) { + dput(dn); goto out; + } } else if (dn->d_inode && (ceph_ino(dn->d_inode) != vino.ino || ceph_snap(dn->d_inode) != vino.snap)) {