diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2016-04-27 14:13:10 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2016-05-02 19:51:14 -0400 |
commit | 0fb1ea0933153180df666f6694855ddfe9408e4a (patch) | |
tree | a3705c12a5f57fadcc5daf3d0eec70a8afa8d918 /fs/namei.c | |
parent | fe9ec8291fcaa74badf0a67e3a82741b3ee40a9e (diff) |
atomic_open(): delay open_to_namei_flags() until the method call
nobody else needs that transformation.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/namei.c b/fs/namei.c index 38eab154cef7..3951cc4f34c5 100644 --- a/fs/namei.c +++ b/fs/namei.c | |||
@@ -2828,7 +2828,7 @@ static int atomic_open(struct nameidata *nd, struct dentry *dentry, | |||
2828 | int *opened) | 2828 | int *opened) |
2829 | { | 2829 | { |
2830 | struct inode *dir = nd->path.dentry->d_inode; | 2830 | struct inode *dir = nd->path.dentry->d_inode; |
2831 | unsigned open_flag = open_to_namei_flags(op->open_flag); | 2831 | unsigned open_flag = op->open_flag; |
2832 | umode_t mode; | 2832 | umode_t mode; |
2833 | int error; | 2833 | int error; |
2834 | int acc_mode; | 2834 | int acc_mode; |
@@ -2886,8 +2886,9 @@ static int atomic_open(struct nameidata *nd, struct dentry *dentry, | |||
2886 | 2886 | ||
2887 | file->f_path.dentry = DENTRY_NOT_SET; | 2887 | file->f_path.dentry = DENTRY_NOT_SET; |
2888 | file->f_path.mnt = nd->path.mnt; | 2888 | file->f_path.mnt = nd->path.mnt; |
2889 | error = dir->i_op->atomic_open(dir, dentry, file, open_flag, mode, | 2889 | error = dir->i_op->atomic_open(dir, dentry, file, |
2890 | opened); | 2890 | open_to_namei_flags(open_flag), |
2891 | mode, opened); | ||
2891 | if (error < 0) { | 2892 | if (error < 0) { |
2892 | if (create_error && error == -ENOENT) | 2893 | if (create_error && error == -ENOENT) |
2893 | error = create_error; | 2894 | error = create_error; |