aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiklos Szeredi <[email protected]>2005-10-30 23:02:09 +0000
committerLinus Torvalds <[email protected]>2005-10-31 01:37:18 +0000
commit42e50a5a69f359e64a143eb0e11a57e18f10c262 (patch)
tree59912bfeeda4fdd34e4a586ecfa58969bd9cffda
parent[PATCH] Don't uselessly export task_struct to userspace in core dumps (diff)
downloadkernel-42e50a5a69f359e64a143eb0e11a57e18f10c262.tar.gz
kernel-42e50a5a69f359e64a143eb0e11a57e18f10c262.zip
[PATCH] open: cleanup in lookup_flags()
lookup_flags() is only called from the non-create case, so it needn't check for O_CREAT|O_EXCL. Signed-off-by: Miklos Szeredi <[email protected]> Cc: Al Viro <[email protected]> Cc: Christoph Hellwig <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--fs/namei.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/namei.c b/fs/namei.c
index aaaa81036234..c5769c4fcab1 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -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)
retval |= LOOKUP_DIRECTORY;