diff options
author | Yan, Zheng <zyan@redhat.com> | 2018-06-19 06:20:34 -0400 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2018-06-26 12:42:44 -0400 |
commit | 8b8f53af1ed9df88a4c0fbfdf3db58f62060edf3 (patch) | |
tree | 4780ca0172a8bdbd80dae7b9d53b6285254799a8 | |
parent | 7daf201d7fe8334e2d2364d4e8ed3394ec9af819 (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.c | 1 |
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) { |