projects
/
profile
/
ivi
/
kernel-x86-ivi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc4fdca
)
ceph: fix leak of dentry in ceph_init_dentry() error path
author
Sage Weil
<sage@newdream.net>
Thu, 22 Jul 2010 21:11:56 +0000
(14:11 -0700)
committer
Sage Weil
<sage@newdream.net>
Fri, 23 Jul 2010 17:02:07 +0000
(10:02 -0700)
If we fail to allocate a ceph_dentry_info, don't leak the dn reference.
Signed-off-by: Sage Weil <sage@newdream.net>
fs/ceph/inode.c
patch
|
blob
|
history
diff --git
a/fs/ceph/inode.c
b/fs/ceph/inode.c
index
8f9b9fe
..
3582e79
100644
(file)
--- a/
fs/ceph/inode.c
+++ b/
fs/ceph/inode.c
@@
-1199,8
+1199,10
@@
retry_lookup:
goto out;
}
err = ceph_init_dentry(dn);
- if (err < 0)
+ if (err < 0) {
+ dput(dn);
goto out;
+ }
} else if (dn->d_inode &&
(ceph_ino(dn->d_inode) != vino.ino ||
ceph_snap(dn->d_inode) != vino.snap)) {