From: Andrew Morton Trond sayeth: We can skip the IS_ERR() test there: if we're following links then we presumably have not tried to open any files yet, so the call to release_open_intent(nd) can be made unconditional. Cc: Alexey Kuznetsov Cc: Kirill Korotaev Cc: Cc: Trond Myklebust Signed-off-by: Andrew Morton --- fs/namei.c | 3 +-- 1 files changed, 1 insertion(+), 2 deletions(-) diff -puN fs/namei.c~struct-file-leakage-tweak fs/namei.c --- a/fs/namei.c~struct-file-leakage-tweak +++ a/fs/namei.c @@ -1717,8 +1717,7 @@ do_link: * me so stupid? Anathema to whoever designed this non-sense * with "intent.open". */ - if (!IS_ERR(nd->intent.open.file)) - release_open_intent(nd); + release_open_intent(nd); return error; } nd->flags &= ~LOOKUP_PARENT; _