Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359157
b: refs/heads/master
c: 5f4a6a6
h: refs/heads/master
i:
  359155: d08bb53
v: v3
  • Loading branch information
Al Viro committed Feb 23, 2013
1 parent dcdc52a commit 46042d1
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ad8ca3743cb7eef0eb8a2e87943c513201685eec
refs/heads/master: 5f4a6a695075b79261793c25b1128e3b30007646
22 changes: 10 additions & 12 deletions trunk/fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -1802,8 +1802,11 @@ static int link_path_walk(const char *name, struct nameidata *nd)
}
}

nd->last = this;
nd->last_type = type;

if (!name[len])
goto last_component;
return 0;
/*
* If it wasn't NUL, we know it was '/'. Skip that
* slash, and continue until no more slashes.
Expand All @@ -1812,7 +1815,8 @@ static int link_path_walk(const char *name, struct nameidata *nd)
len++;
} while (unlikely(name[len] == '/'));
if (!name[len])
goto last_component;
return 0;

name += len;

err = walk_component(nd, &next, &this, type, LOOKUP_FOLLOW);
Expand All @@ -1824,16 +1828,10 @@ static int link_path_walk(const char *name, struct nameidata *nd)
if (err)
return err;
}
if (can_lookup(nd->inode))
continue;
err = -ENOTDIR;
break;
/* here ends the main loop */

last_component:
nd->last = this;
nd->last_type = type;
return 0;
if (!can_lookup(nd->inode)) {
err = -ENOTDIR;
break;
}
}
terminate_walk(nd);
return err;
Expand Down

0 comments on commit 46042d1

Please sign in to comment.