Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 298370
b: refs/heads/master
c: cda309d
h: refs/heads/master
v: v3
  • Loading branch information
Miklos Szeredi authored and Al Viro committed Mar 31, 2012
1 parent 328d0de commit 354af3d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 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: 3637c05d881b2b7bab36f339245b8963f5b29c9f
refs/heads/master: cda309de253f338b04d15b4478e45fc3a0fcc7a3
11 changes: 5 additions & 6 deletions trunk/fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -1849,13 +1849,7 @@ int vfs_path_lookup(struct dentry *dentry, struct vfsmount *mnt,
static struct dentry *__lookup_hash(struct qstr *name,
struct dentry *base, struct nameidata *nd)
{
struct inode *inode = base->d_inode;
struct dentry *dentry;
int err;

err = inode_permission(inode, MAY_EXEC);
if (err)
return ERR_PTR(err);

/*
* Don't bother with __d_lookup: callers are for creat as
Expand Down Expand Up @@ -1922,6 +1916,7 @@ struct dentry *lookup_one_len(const char *name, struct dentry *base, int len)
{
struct qstr this;
unsigned int c;
int err;

WARN_ON_ONCE(!mutex_is_locked(&base->d_inode->i_mutex));

Expand All @@ -1946,6 +1941,10 @@ struct dentry *lookup_one_len(const char *name, struct dentry *base, int len)
return ERR_PTR(err);
}

err = inode_permission(base->d_inode, MAY_EXEC);
if (err)
return ERR_PTR(err);

return __lookup_hash(&this, base, NULL);
}

Expand Down

0 comments on commit 354af3d

Please sign in to comment.