Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252699
b: refs/heads/master
c: dea3937
h: refs/heads/master
i:
  252697: ab29996
  252695: 4369807
v: v3
  • Loading branch information
Al Viro committed May 27, 2011
1 parent 8b10c39 commit c955759
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 19 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: 287548e46aa752ce9bb87fcff46f8aa794cc5037
refs/heads/master: dea3937619cb67d2ad08e2d29ae923875b1eeee9
26 changes: 8 additions & 18 deletions trunk/fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -951,29 +951,21 @@ static bool __follow_mount_rcu(struct nameidata *nd, struct path *path,
return true;
}

static void follow_mount_rcu(struct nameidata *nd, struct path *path,
struct inode **inode)
static void follow_mount_rcu(struct nameidata *nd)
{
for (;;) {
while (d_mountpoint(nd->path.dentry)) {
struct vfsmount *mounted;
*inode = path->dentry->d_inode;

if (!d_mountpoint(path->dentry))
break;

mounted = __lookup_mnt(path->mnt, path->dentry, 1);
mounted = __lookup_mnt(nd->path.mnt, nd->path.dentry, 1);
if (!mounted)
break;
path->mnt = mounted;
path->dentry = mounted->mnt_root;
nd->seq = read_seqcount_begin(&path->dentry->d_seq);
nd->path.mnt = mounted;
nd->path.dentry = mounted->mnt_root;
nd->seq = read_seqcount_begin(&nd->path.dentry->d_seq);
}
}

static int follow_dotdot_rcu(struct nameidata *nd)
{
struct inode *inode = nd->inode;

set_root_rcu(nd);

while (1) {
Expand All @@ -989,18 +981,16 @@ static int follow_dotdot_rcu(struct nameidata *nd)
seq = read_seqcount_begin(&parent->d_seq);
if (read_seqcount_retry(&old->d_seq, nd->seq))
goto failed;
inode = parent->d_inode;
nd->path.dentry = parent;
nd->seq = seq;
break;
}
if (!follow_up_rcu(&nd->path))
break;
nd->seq = read_seqcount_begin(&nd->path.dentry->d_seq);
inode = nd->path.dentry->d_inode;
}
follow_mount_rcu(nd, &nd->path, &inode);
nd->inode = inode;
follow_mount_rcu(nd);
nd->inode = nd->path.dentry->d_inode;
return 0;

failed:
Expand Down

0 comments on commit c955759

Please sign in to comment.