diff options
-rw-r--r-- | include/linux/fs.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 1888da76510..909e13ef520 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -63,17 +63,23 @@ extern int dir_notify_enable; #define MAY_ACCESS 16 #define MAY_OPEN 32 +/* + * flags in file.f_mode. Note that FMODE_READ and FMODE_WRITE must correspond + * to O_WRONLY and O_RDWR via the strange trick in __dentry_open() + */ + /* file is open for reading */ #define FMODE_READ (1) /* file is open for writing */ #define FMODE_WRITE (2) /* file is seekable */ #define FMODE_LSEEK (4) -/* file can be accessed using pread/pwrite */ +/* file can be accessed using pread */ #define FMODE_PREAD (8) -#define FMODE_PWRITE FMODE_PREAD /* These go hand in hand */ +/* file can be accessed using pwrite */ +#define FMODE_PWRITE (16) /* File is opened for execution with sys_execve / sys_uselib */ -#define FMODE_EXEC (16) +#define FMODE_EXEC (32) #define RW_MASK 1 #define RWA_MASK 2 |