diff options
author | Kirill Korotaev <dev@sw.ru> | 2006-08-30 22:55:59 +0200 |
---|---|---|
committer | Adrian Bunk <bunk@stusta.de> | 2006-08-30 22:55:59 +0200 |
commit | 26c0273b7f4b1510eec4f0f92d19971dc0c2fd67 (patch) | |
tree | d3de17af137b40fda19f82eb4198283d43f4d115 /fs | |
parent | cbca4f2e2cba4f8d4482d6ddd21199b71c2476b0 (diff) |
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>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/namei.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/namei.c b/fs/namei.c index f11c0aa2293..3ece3a93dd9 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -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; |