fix struct file leakage

2.6.16 leaks like hell. While testing, I found massive filp leakage
(reproduced in openvz) in the bowels of namei.c.

Signed-off-by: Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>
Signed-off-by: Adrian Bunk <bunk@stusta.de>
This commit is contained in:
Kirill Korotaev
2006-08-30 22:55:59 +02:00
committed by Adrian Bunk
parent cbca4f2e2c
commit 26c0273b7f
+7 -1
View File
@@ -1708,8 +1708,14 @@ do_link:
if (error)
goto exit_dput;
error = __do_follow_link(&path, nd);
if (error)
if (error) {
/* Does someone understand code flow here? Or it is only
* me so stupid? Anathema to whoever designed this non-sense
* with "intent.open".
*/
release_open_intent(nd);
return error;
}
nd->flags &= ~LOOKUP_PARENT;
if (nd->last_type == LAST_BIND)
goto ok;