]> nv-tegra.nvidia Code Review - linux-2.6.git/blobdiff - fs/exec.c
VFS: Remove redundant open-coded mode bit checks in open_exec().
[linux-2.6.git] / fs / exec.c
index a6f64a98ac508a5d29da37f30988e83ef7b1ec9c..f7aabfeca0331fa0b09b16d28a4931af95b7c29a 100644 (file)
--- a/fs/exec.c
+++ b/fs/exec.c
@@ -486,8 +486,6 @@ struct file *open_exec(const char *name)
                if (!(nd.mnt->mnt_flags & MNT_NOEXEC) &&
                    S_ISREG(inode->i_mode)) {
                        int err = vfs_permission(&nd, MAY_EXEC);
-                       if (!err && !(inode->i_mode & 0111))
-                               err = -EACCES;
                        file = ERR_PTR(err);
                        if (!err) {
                                file = nameidata_to_filp(&nd, O_RDONLY);