Whamcloud - gitweb
b=18649 set wait_recovery_complete() MAX value to max recovery time estimated
[fs/lustre-release.git] / lustre / kernel_patches / patches / fmode-exec-2.6-sles10.patch
1 Index: LINUX-SRC-TREE/include/linux/fs.h
2 ===================================================================
3 --- LINUX-SRC-TREE.orig/include/linux/fs.h
4 +++ LINUX-SRC-TREE/include/linux/fs.h
5 @@ -61,6 +61,7 @@ extern int dir_notify_enable;
6  
7  #define FMODE_READ 1
8  #define FMODE_WRITE 2
9 +#define FMODE_EXEC 16
10  
11  /* Internal kernel extensions */
12  #define FMODE_LSEEK    4
13 Index: LINUX-SRC-TREE/fs/exec.c
14 ===================================================================
15 --- LINUX-SRC-TREE.orig/fs/exec.c
16 +++ LINUX-SRC-TREE/fs/exec.c
17 @@ -129,7 +129,8 @@ asmlinkage long sys_uselib(const char __
18         struct nameidata nd;
19         int error;
20  
21 -       error = __user_path_lookup_open(library, LOOKUP_FOLLOW, &nd, FMODE_READ);
22 +       error = __user_path_lookup_open(library, LOOKUP_FOLLOW, &nd,
23 +                                       FMODE_READ | FMODE_EXEC);
24         if (error)
25                 goto out;
26  
27 @@ -481,7 +483,8 @@ struct file *open_exec(const char *name)
28         int err;
29         struct file *file;
30  
31 -       err = path_lookup_open(AT_FDCWD, name, LOOKUP_FOLLOW, &nd, FMODE_READ);
32 +       err = path_lookup_open(AT_FDCWD, name, LOOKUP_FOLLOW, &nd,
33 +                              FMODE_READ | FMODE_EXEC);
34         file = ERR_PTR(err);
35  
36         if (!err) {