Merge branch 'topic/ctxfi' into for-linus
[pandora-kernel.git] / fs / nfs / dir.c
index 370b190..89f98e9 100644 (file)
@@ -1943,7 +1943,8 @@ int nfs_permission(struct inode *inode, int mask)
                case S_IFREG:
                        /* NFSv4 has atomic_open... */
                        if (nfs_server_capable(inode, NFS_CAP_ATOMIC_OPEN)
-                                       && (mask & MAY_OPEN))
+                                       && (mask & MAY_OPEN)
+                                       && !(mask & MAY_EXEC))
                                goto out;
                        break;
                case S_IFDIR: