Skip to content

Commit

Permalink
atomic_open(): delay open_to_namei_flags() until the method call
Browse files Browse the repository at this point in the history
nobody else needs that transformation.

Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Al Viro committed May 2, 2016
1 parent fe9ec82 commit 0fb1ea0
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -2828,7 +2828,7 @@ static int atomic_open(struct nameidata *nd, struct dentry *dentry,
int *opened)
{
struct inode *dir = nd->path.dentry->d_inode;
unsigned open_flag = open_to_namei_flags(op->open_flag);
unsigned open_flag = op->open_flag;
umode_t mode;
int error;
int acc_mode;
Expand Down Expand Up @@ -2886,8 +2886,9 @@ static int atomic_open(struct nameidata *nd, struct dentry *dentry,

file->f_path.dentry = DENTRY_NOT_SET;
file->f_path.mnt = nd->path.mnt;
error = dir->i_op->atomic_open(dir, dentry, file, open_flag, mode,
opened);
error = dir->i_op->atomic_open(dir, dentry, file,
open_to_namei_flags(open_flag),
mode, opened);
if (error < 0) {
if (create_error && error == -ENOENT)
error = create_error;
Expand Down

0 comments on commit 0fb1ea0

Please sign in to comment.