Skip to content

Commit

Permalink
ceph: fix dentry leak in splice_dentry()
Browse files Browse the repository at this point in the history
In any case, d_splice_alias() does not drop reference of original
dentry.

Signed-off-by: "Yan, Zheng" <[email protected]>
Reviewed-by: Jeff Layton <[email protected]>
Signed-off-by: Ilya Dryomov <[email protected]>
  • Loading branch information
ukernel authored and idryomov committed Jun 26, 2018
1 parent 7daf201 commit 8b8f53a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions fs/ceph/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1135,6 +1135,7 @@ static struct dentry *splice_dentry(struct dentry *dn, struct inode *in)
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));
dput(dn);
dn = realdn; /* note realdn contains the error */
goto out;
} else if (realdn) {
Expand Down

0 comments on commit 8b8f53a

Please sign in to comment.