@@ -1828,6 +1828,7 @@ static int link_path_walk(const char *name, struct nameidata *nd)
return 0;
err = walk_component(nd, &next, LOOKUP_FOLLOW);
+Walked:
if (err < 0)
return err;
@@ -1846,7 +1847,6 @@ static int link_path_walk(const char *name, struct nameidata *nd)
nd->depth++;
nd->link_count++;
-l:
link = next;
s = get_link(&link, nd, &cookie);
@@ -1883,13 +1883,7 @@ l:
put_link(nd, &link, cookie);
nd->link_count--;
nd->depth--;
- if (err < 0)
- return err;
- if (err > 0) {
- nd->link_count++;
- nd->depth++;
- goto l;
- }
+ goto Walked;
}
}
}