make get_link() increment nd->depth on successful exit
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
out:
path_put(&nd->path);
path_put(&last->link);
+ return res;
}
}
+ nd->depth++;
return res;
}
}
s = get_link(nd);
- nd->depth++;
if (unlikely(IS_ERR(s))) {
err = PTR_ERR(s);
- nd->depth--;
goto Err;
}
err = 0;
s = get_link(nd);
if (unlikely(IS_ERR(s)))
return PTR_ERR(s);
- nd->depth++;
if (unlikely(!s)) {
nd->depth--;
return 0;