commit | 5cba372c0fe78d24e83d9e0556ecbeb219625c15 | [log] [tgz] |
---|---|---|
author | Yan, Zheng <zyan@redhat.com> | Mon Feb 02 11:27:56 2015 +0800 |
committer | Ilya Dryomov <idryomov@gmail.com> | Thu Feb 19 13:31:40 2015 +0300 |
tree | dcb8742257a0243d9afbe157cb6f6222afd98371 | |
parent | 3de22be6771353241eaec237fe594dfea3daf30f [diff] [blame] |
ceph: fix dentry leaks Signed-off-by: Yan, Zheng <zyan@redhat.com>
diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index f88a0f0..be3af18 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c
@@ -1449,12 +1449,14 @@ } if (!dn->d_inode) { - dn = splice_dentry(dn, in, NULL); - if (IS_ERR(dn)) { - err = PTR_ERR(dn); + struct dentry *realdn = splice_dentry(dn, in, NULL); + if (IS_ERR(realdn)) { + err = PTR_ERR(realdn); + d_drop(dn); dn = NULL; goto next_item; } + dn = realdn; } di = dn->d_fsdata;