projects
/
openwrt
/
staging
/
blogic.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 709f3b98ca5cde7fbcf4f2d14a2299cf87e7633d..77eeb768f95acb56d3fced3839cdf1d37bd1ec8a 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 f88a0f059dc8e24f677755c03905dba659181e03..be3af18e4cf1369196c56179f855b93081cf1a92 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;