Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185714
b: refs/heads/master
c: 3088dd7
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro committed Mar 3, 2010
1 parent fe5f910 commit d864ab5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 17 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: de27a5bf9caef3f1fca1f315aa58eee54fbf929a
refs/heads/master: 3088dd7080d1ecc6d18c27ef9e617cbbd2a2e51e
19 changes: 3 additions & 16 deletions trunk/fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -689,33 +689,20 @@ static __always_inline void follow_dotdot(struct nameidata *nd)
set_root(nd);

while(1) {
struct vfsmount *parent;
struct dentry *old = nd->path.dentry;

if (nd->path.dentry == nd->root.dentry &&
nd->path.mnt == nd->root.mnt) {
break;
}
spin_lock(&dcache_lock);
if (nd->path.dentry != nd->path.mnt->mnt_root) {
nd->path.dentry = dget(nd->path.dentry->d_parent);
spin_unlock(&dcache_lock);
/* rare case of legitimate dget_parent()... */
nd->path.dentry = dget_parent(nd->path.dentry);
dput(old);
break;
}
spin_unlock(&dcache_lock);
spin_lock(&vfsmount_lock);
parent = nd->path.mnt->mnt_parent;
if (parent == nd->path.mnt) {
spin_unlock(&vfsmount_lock);
if (!follow_up(&nd->path))
break;
}
mntget(parent);
nd->path.dentry = dget(nd->path.mnt->mnt_mountpoint);
spin_unlock(&vfsmount_lock);
dput(old);
mntput(nd->path.mnt);
nd->path.mnt = parent;
}
follow_mount(&nd->path);
}
Expand Down

0 comments on commit d864ab5

Please sign in to comment.