Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 177401
b: refs/heads/master
c: b75b508
h: refs/heads/master
i:
  177399: 9f3a5b3
v: v3
  • Loading branch information
Al Viro committed Dec 16, 2009
1 parent 62a6478 commit 49ee866
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 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: 6e6b1bd1e739faf4fa259fc0d8bfcadea2493222
refs/heads/master: b75b5086be6504132eadb22a907854e0bf52e365
17 changes: 8 additions & 9 deletions trunk/fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,16 +412,15 @@ do_revalidate(struct dentry *dentry, struct nameidata *nd)
}

/*
* Short-cut version of permission(), for calling by
* path_walk(), when dcache lock is held. Combines parts
* of permission() and generic_permission(), and tests ONLY for
* MAY_EXEC permission.
* Short-cut version of permission(), for calling on directories
* during pathname resolution. Combines parts of permission()
* and generic_permission(), and tests ONLY for MAY_EXEC permission.
*
* If appropriate, check DAC only. If not appropriate, or
* short-cut DAC fails, then call permission() to do more
* short-cut DAC fails, then call ->permission() to do more
* complete permission check.
*/
static int exec_permission_lite(struct inode *inode)
static int exec_permission(struct inode *inode)
{
int ret;

Expand Down Expand Up @@ -807,7 +806,7 @@ static int link_path_walk(const char *name, struct nameidata *nd)
unsigned int c;

nd->flags |= LOOKUP_CONTINUE;
err = exec_permission_lite(inode);
err = exec_permission(inode);
if (err)
break;

Expand Down Expand Up @@ -1155,7 +1154,7 @@ static struct dentry *lookup_hash(struct nameidata *nd)
{
int err;

err = inode_permission(nd->path.dentry->d_inode, MAY_EXEC);
err = exec_permission(nd->path.dentry->d_inode);
if (err)
return ERR_PTR(err);
return __lookup_hash(&nd->last, nd->path.dentry, nd);
Expand Down Expand Up @@ -1205,7 +1204,7 @@ struct dentry *lookup_one_len(const char *name, struct dentry *base, int len)
if (err)
return ERR_PTR(err);

err = inode_permission(base->d_inode, MAY_EXEC);
err = exec_permission(base->d_inode);
if (err)
return ERR_PTR(err);
return __lookup_hash(&this, base, NULL);
Expand Down

0 comments on commit 49ee866

Please sign in to comment.