namei: simplify failure exits in get_link()
authorAl Viro <viro@zeniv.linux.org.uk>
Sun, 10 May 2015 14:43:46 +0000 (10:43 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Mon, 11 May 2015 02:20:16 +0000 (22:20 -0400)
commit6920a4405e6ff7813de4d5a9eb5e0b475e41a06b
treeebed3fe2c3b616b9793dcf58bbe54c3a20e8ae76
parent6e77137b363b8d866ac29c5a0c95e953614fb2d8
namei: simplify failure exits in get_link()

when cookie is NULL, put_link() is equivalent to path_put(), so
as soon as we'd set last->cookie to NULL, we can bump nd->depth and
let the normal logics in terminate_walk() to take care of cleanups.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/namei.c