Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234256
b: refs/heads/master
c: a7472ba
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro committed Mar 14, 2011
1 parent 2774bbf commit 3f491ba
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 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: ef7562d5283a91da3ba5c14de3221f47b7f08823
refs/heads/master: a7472baba22dd5d68580f528374f93421b33667e
16 changes: 11 additions & 5 deletions trunk/fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,8 +498,15 @@ static int nameidata_dentry_drop_rcu(struct nameidata *nd, struct dentry *dentry
/* Try to drop out of rcu-walk mode if we were in it, otherwise do nothing. */
static inline int nameidata_dentry_drop_rcu_maybe(struct nameidata *nd, struct dentry *dentry)
{
if (nd->flags & LOOKUP_RCU)
return nameidata_dentry_drop_rcu(nd, dentry);
if (nd->flags & LOOKUP_RCU) {
if (unlikely(nameidata_dentry_drop_rcu(nd, dentry))) {
nd->flags &= ~LOOKUP_RCU;
nd->root.mnt = NULL;
rcu_read_unlock();
br_read_unlock(vfsmount_lock);
return -ECHILD;
}
}
return 0;
}

Expand Down Expand Up @@ -1424,7 +1431,7 @@ static int link_path_walk(const char *name, struct nameidata *nd)
if (inode && inode->i_op->follow_link) {
err = do_follow_link(inode, &next, nd);
if (err)
goto return_err;
return err;
nd->inode = nd->path.dentry->d_inode;
} else {
path_to_nameidata(&next, nd);
Expand Down Expand Up @@ -1455,7 +1462,7 @@ static int link_path_walk(const char *name, struct nameidata *nd)
(lookup_flags & LOOKUP_FOLLOW)) {
err = do_follow_link(inode, &next, nd);
if (err)
goto return_err;
return err;
nd->inode = nd->path.dentry->d_inode;
} else {
path_to_nameidata(&next, nd);
Expand All @@ -1477,7 +1484,6 @@ static int link_path_walk(const char *name, struct nameidata *nd)
}
if (!(nd->flags & LOOKUP_RCU))
path_put(&nd->path);
return_err:
if (nd->flags & LOOKUP_RCU) {
nd->flags &= ~LOOKUP_RCU;
nd->root.mnt = NULL;
Expand Down

0 comments on commit 3f491ba

Please sign in to comment.