Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 177398
b: refs/heads/master
c: 3cac260
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro committed Dec 16, 2009
1 parent ce80e30 commit 4dd1a5e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 18 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: e9496ff46a20a8592fdc7bdaaf41b45eb808d310
refs/heads/master: 3cac260ad88f4e37637d6e4b33e6a6a849d273c7
28 changes: 11 additions & 17 deletions trunk/fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -767,8 +767,18 @@ static int do_lookup(struct nameidata *nd, struct qstr *name,
struct path *path)
{
struct vfsmount *mnt = nd->path.mnt;
struct dentry *dentry = __d_lookup(nd->path.dentry, name);
struct dentry *dentry;
/*
* See if the low-level filesystem might want
* to use its own hash..
*/
if (nd->path.dentry->d_op && nd->path.dentry->d_op->d_hash) {
int err = nd->path.dentry->d_op->d_hash(nd->path.dentry, name);
if (err < 0)
return err;
}

dentry = __d_lookup(nd->path.dentry, name);
if (!dentry)
goto need_lookup;
if (dentry->d_op && dentry->d_op->d_revalidate)
Expand Down Expand Up @@ -868,16 +878,6 @@ static int link_path_walk(const char *name, struct nameidata *nd)
case 1:
continue;
}
/*
* See if the low-level filesystem might want
* to use its own hash..
*/
if (nd->path.dentry->d_op && nd->path.dentry->d_op->d_hash) {
err = nd->path.dentry->d_op->d_hash(nd->path.dentry,
&this);
if (err < 0)
break;
}
/* This does the actual lookups.. */
err = do_lookup(nd, &this, &next);
if (err)
Expand Down Expand Up @@ -923,12 +923,6 @@ static int link_path_walk(const char *name, struct nameidata *nd)
case 1:
goto return_reval;
}
if (nd->path.dentry->d_op && nd->path.dentry->d_op->d_hash) {
err = nd->path.dentry->d_op->d_hash(nd->path.dentry,
&this);
if (err < 0)
break;
}
err = do_lookup(nd, &this, &next);
if (err)
break;
Expand Down

0 comments on commit 4dd1a5e

Please sign in to comment.