diff options
author | Christoph Hellwig <hch@lst.de> | 2017-04-27 09:42:24 +0200 |
---|---|---|
committer | Sasha Levin <alexander.levin@verizon.com> | 2017-07-31 13:37:52 -0400 |
commit | 666d1fc2023eee3bf723c764eeeabb21d71a11f2 (patch) | |
tree | 6eeb120c7673e43531608a658e6cbd86bba1ac2d /include/linux | |
parent | c49e84bb5c462afc894b0b87714b87e36f039750 (diff) |
fs: add a VALID_OPEN_FLAGS
[ Upstream commit 80f18379a7c350c011d30332658aa15fe49a8fa5 ]
Add a central define for all valid open flags, and use it in the uniqueness
check.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/fcntl.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/fcntl.h b/include/linux/fcntl.h index 76ce329e656d..1b48d9c9a561 100644 --- a/include/linux/fcntl.h +++ b/include/linux/fcntl.h @@ -3,6 +3,12 @@ #include <uapi/linux/fcntl.h> +/* list of all valid flags for the open/openat flags argument: */ +#define VALID_OPEN_FLAGS \ + (O_RDONLY | O_WRONLY | O_RDWR | O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC | \ + O_APPEND | O_NDELAY | O_NONBLOCK | O_NDELAY | __O_SYNC | O_DSYNC | \ + FASYNC | O_DIRECT | O_LARGEFILE | O_DIRECTORY | O_NOFOLLOW | \ + O_NOATIME | O_CLOEXEC | O_PATH | __O_TMPFILE) #ifndef force_o_largefile #define force_o_largefile() (BITS_PER_LONG != 32) |