Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 320968
b: refs/heads/master
c: f8310c5
h: refs/heads/master
v: v3
  • Loading branch information
Al Viro committed Jul 30, 2012
1 parent 3a59811 commit 22ba816
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bf8848918d751c1fb86f6514a75bf8d406f1c3c3
refs/heads/master: f8310c59201b183ebee2e3fe0c7242f5729be0af
4 changes: 2 additions & 2 deletions trunk/fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -2418,7 +2418,7 @@ static int atomic_open(struct nameidata *nd, struct dentry *dentry,
if ((open_flag & O_CREAT) && !IS_POSIXACL(dir))
mode &= ~current_umask();

if (open_flag & O_EXCL) {
if ((open_flag & (O_EXCL | O_CREAT)) == (O_EXCL | O_CREAT)) {
open_flag &= ~O_TRUNC;
*opened |= FILE_CREATED;
}
Expand Down Expand Up @@ -2742,7 +2742,7 @@ static int do_last(struct nameidata *nd, struct path *path,
}

error = -EEXIST;
if (open_flag & O_EXCL)
if ((open_flag & (O_EXCL | O_CREAT)) == (O_EXCL | O_CREAT))
goto exit_dput;

error = follow_managed(path, nd->flags);
Expand Down

0 comments on commit 22ba816

Please sign in to comment.