diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-03-14 17:02:47 +0100 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-04-02 05:19:12 +0200 |
commit | 83f936c75e3689a63253d89c47a4d239c56d7410 (patch) | |
tree | 430d89096a9b56ffb8e80bd4febde39e1d05ad4c /include | |
parent | fold __get_file_write_access() into its only caller (diff) | |
download | linux-83f936c75e3689a63253d89c47a4d239c56d7410.tar.xz linux-83f936c75e3689a63253d89c47a4d239c56d7410.zip |
mark struct file that had write access grabbed by open()
new flag in ->f_mode - FMODE_WRITER. Set by do_dentry_open() in case
when it has grabbed write access, checked by __fput() to decide whether
it wants to drop the sucker. Allows to stop bothering with mnt_clone_write()
in alloc_file(), along with fewer special_file() checks.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fs.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index e80659ed78fc..d9d88a0b456e 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -125,6 +125,8 @@ typedef void (dio_iodone_t)(struct kiocb *iocb, loff_t offset, /* File needs atomic accesses to f_pos */ #define FMODE_ATOMIC_POS ((__force fmode_t)0x8000) +/* Write access to underlying fs */ +#define FMODE_WRITER ((__force fmode_t)0x10000) /* File was opened by fanotify and shouldn't generate fanotify events */ #define FMODE_NONOTIFY ((__force fmode_t)0x1000000) |