提交 b0c24c3b 编写于 作者: A Al Viro

link_path_walk: handle get_link() returning ERR_PTR() immediately

If we get ERR_PTR() from get_link(), we are guaranteed to get err != 0
when we break out of do-while, so we are going to hit if (err) return err;
shortly after it.  Pull that into the if (IS_ERR(s)) body.
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 95fa25d9
......@@ -1792,7 +1792,9 @@ static int link_path_walk(const char *name, struct nameidata *nd)
if (unlikely(IS_ERR(s))) {
err = PTR_ERR(s);
break;
current->link_count--;
nd->depth--;
return err;
}
err = 0;
if (likely(s)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册