Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234255
b: refs/heads/master
c: ef7562d
h: refs/heads/master
i:
  234253: cb90363
  234251: 5a296a1
  234247: 13ad09f
  234239: c36f953
v: v3
  • Loading branch information
Al Viro committed Mar 14, 2011
1 parent 3fab534 commit 2774bbf
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 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: 4455ca6223cc59cbc0a75f4be8bce9e84cc0d6b8
refs/heads/master: ef7562d5283a91da3ba5c14de3221f47b7f08823
23 changes: 12 additions & 11 deletions trunk/fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ static int follow_dotdot_rcu(struct nameidata *nd)

seq = read_seqcount_begin(&parent->d_seq);
if (read_seqcount_retry(&old->d_seq, nd->seq))
return -ECHILD;
goto failed;
inode = parent->d_inode;
nd->path.dentry = parent;
nd->seq = seq;
Expand All @@ -1065,8 +1065,14 @@ static int follow_dotdot_rcu(struct nameidata *nd)
}
__follow_mount_rcu(nd, &nd->path, &inode, true);
nd->inode = inode;

return 0;

failed:
nd->flags &= ~LOOKUP_RCU;
nd->root.mnt = NULL;
rcu_read_unlock();
br_read_unlock(vfsmount_lock);
return -ECHILD;
}

/*
Expand Down Expand Up @@ -1405,9 +1411,8 @@ static int link_path_walk(const char *name, struct nameidata *nd)
* parent relationships.
*/
if (unlikely(type != LAST_NORM)) {
err = handle_dots(nd, type);
if (err)
goto return_err;
if (handle_dots(nd, type))
return -ECHILD;
continue;
}

Expand Down Expand Up @@ -1441,12 +1446,8 @@ static int link_path_walk(const char *name, struct nameidata *nd)
nd->flags &= lookup_flags | ~LOOKUP_CONTINUE;
if (lookup_flags & LOOKUP_PARENT)
goto lookup_parent;
if (unlikely(type != LAST_NORM)) {
err = handle_dots(nd, type);
if (err)
goto return_err;
return 0;
}
if (unlikely(type != LAST_NORM))
return handle_dots(nd, type);
err = do_lookup(nd, &this, &next, &inode);
if (err)
break;
Expand Down

0 comments on commit 2774bbf

Please sign in to comment.