projects
/
platform
/
kernel
/
linux-amlogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3de22be
)
ceph: fix dentry leaks
author
Yan, Zheng
<zyan@redhat.com>
Mon, 2 Feb 2015 03:27:56 +0000
(11:27 +0800)
committer
Ilya Dryomov
<idryomov@gmail.com>
Thu, 19 Feb 2015 10:31:40 +0000
(13:31 +0300)
Signed-off-by: Yan, Zheng <zyan@redhat.com>
fs/ceph/dir.c
patch
|
blob
|
history
fs/ceph/inode.c
patch
|
blob
|
history
diff --git
a/fs/ceph/dir.c
b/fs/ceph/dir.c
index
709f3b9
..
77eeb76
100644
(file)
--- a/
fs/ceph/dir.c
+++ b/
fs/ceph/dir.c
@@
-676,6
+676,7
@@
int ceph_handle_notrace_create(struct inode *dir, struct dentry *dentry)
*/
BUG_ON(!result->d_inode);
d_instantiate(dentry, result->d_inode);
+ d_drop(result);
return 0;
}
return PTR_ERR(result);
diff --git
a/fs/ceph/inode.c
b/fs/ceph/inode.c
index
f88a0f0
..
be3af18
100644
(file)
--- a/
fs/ceph/inode.c
+++ b/
fs/ceph/inode.c
@@
-1449,12
+1449,14
@@
retry_lookup:
}
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;