summaryrefslogtreecommitdiffstats
path: root/fs/namei.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/namei.c')
-rw-r--r--fs/namei.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 929f535fb225..e645e3070360 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -434,8 +434,12 @@ static int exec_permission_lite(struct inode *inode)
{
umode_t mode = inode->i_mode;
- if (inode->i_op->permission)
- return inode_permission(inode, MAY_EXEC);
+ if (inode->i_op->permission) {
+ int ret = inode->i_op->permission(inode, MAY_EXEC);
+ if (!ret)
+ goto ok;
+ return ret;
+ }
if (current_fsuid() == inode->i_uid)
mode >>= 6;