aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2018-06-19 06:20:34 -0400
committerIlya Dryomov <idryomov@gmail.com>2018-06-26 12:42:44 -0400
commit8b8f53af1ed9df88a4c0fbfdf3db58f62060edf3 (patch)
tree4780ca0172a8bdbd80dae7b9d53b6285254799a8
parent7daf201d7fe8334e2d2364d4e8ed3394ec9af819 (diff)
ceph: fix dentry leak in splice_dentry()
In any case, d_splice_alias() does not drop reference of original dentry. Signed-off-by: "Yan, Zheng" <zyan@redhat.com> Reviewed-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
-rw-r--r--fs/ceph/inode.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c
index ee764ac352ab..a866be999216 100644
--- a/fs/ceph/inode.c
+++ b/fs/ceph/inode.c
@@ -1135,6 +1135,7 @@ static struct dentry *splice_dentry(struct dentry *dn, struct inode *in)
1135 if (IS_ERR(realdn)) { 1135 if (IS_ERR(realdn)) {
1136 pr_err("splice_dentry error %ld %p inode %p ino %llx.%llx\n", 1136 pr_err("splice_dentry error %ld %p inode %p ino %llx.%llx\n",
1137 PTR_ERR(realdn), dn, in, ceph_vinop(in)); 1137 PTR_ERR(realdn), dn, in, ceph_vinop(in));
1138 dput(dn);
1138 dn = realdn; /* note realdn contains the error */ 1139 dn = realdn; /* note realdn contains the error */
1139 goto out; 1140 goto out;
1140 } else if (realdn) { 1141 } else if (realdn) {