Commit 42e50a5a authored by Miklos Szeredi's avatar Miklos Szeredi Committed by Linus Torvalds
Browse files

[PATCH] open: cleanup in lookup_flags()

lookup_flags() is only called from the non-create case, so it needn't check
Signed-off-by: default avatarMiklos Szeredi <>
Cc: Al Viro <>
Cc: Christoph Hellwig <>
Signed-off-by: default avatarAndrew Morton <>
Signed-off-by: default avatarLinus Torvalds <>
parent a9289728
......@@ -1311,9 +1311,6 @@ static inline int may_create(struct inode *dir, struct dentry *child,
* Special case: O_CREAT|O_EXCL implies O_NOFOLLOW for security
* reasons.
* O_DIRECTORY translates into forcing a directory lookup.
static inline int lookup_flags(unsigned int f)
......@@ -1323,9 +1320,6 @@ static inline int lookup_flags(unsigned int f)
if (f & O_NOFOLLOW)
retval &= ~LOOKUP_FOLLOW;
if ((f & (O_CREAT|O_EXCL)) == (O_CREAT|O_EXCL))
retval &= ~LOOKUP_FOLLOW;
if (f & O_DIRECTORY)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment