summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-08-28 10:50:37 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2009-09-08 11:07:43 -0700
commitb7a437b08a44a3ed7e3a052eb39d2c5f618b603b (patch)
treefdb03edf0254e9f24fe7f3e3e2f75d3ac0a3f9e0 /fs
parente8e66ed25b5cbeebed69c475f6c108e52078a3b3 (diff)
Simplify exec_permission_lite() logic
Instead of returning EAGAIN and having the caller do something special for that case, just do the special case directly. Reviewed-by: James Morris <jmorris@namei.org> Acked-by: Serge Hallyn <serue@us.ibm.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/namei.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/namei.c b/fs/namei.c
index a005d8b7afad..8c3580610eec 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -435,7 +435,7 @@ static int exec_permission_lite(struct inode *inode)
umode_t mode = inode->i_mode;
if (inode->i_op->permission)
- return -EAGAIN;
+ return inode_permission(inode, MAY_EXEC);
if (current_fsuid() == inode->i_uid)
mode >>= 6;
@@ -853,9 +853,6 @@ static int __link_path_walk(const char *name, struct nameidata *nd)
nd->flags |= LOOKUP_CONTINUE;
err = exec_permission_lite(inode);
- if (err == -EAGAIN)
- err = inode_permission(nd->path.dentry->d_inode,
- MAY_EXEC);
if (err)
break;