diff options
Diffstat (limited to 'fs/anon_inodes.c')
-rw-r--r-- | fs/anon_inodes.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/anon_inodes.c b/fs/anon_inodes.c index 2c994591f4d7..9f0bf13291e5 100644 --- a/fs/anon_inodes.c +++ b/fs/anon_inodes.c | |||
@@ -121,13 +121,13 @@ struct file *anon_inode_getfile(const char *name, | |||
121 | d_instantiate(path.dentry, anon_inode_inode); | 121 | d_instantiate(path.dentry, anon_inode_inode); |
122 | 122 | ||
123 | error = -ENFILE; | 123 | error = -ENFILE; |
124 | file = alloc_file(&path, FMODE_READ | FMODE_WRITE, fops); | 124 | file = alloc_file(&path, OPEN_FMODE(flags), fops); |
125 | if (!file) | 125 | if (!file) |
126 | goto err_dput; | 126 | goto err_dput; |
127 | file->f_mapping = anon_inode_inode->i_mapping; | 127 | file->f_mapping = anon_inode_inode->i_mapping; |
128 | 128 | ||
129 | file->f_pos = 0; | 129 | file->f_pos = 0; |
130 | file->f_flags = O_RDWR | (flags & O_NONBLOCK); | 130 | file->f_flags = flags & (O_ACCMODE | O_NONBLOCK); |
131 | file->f_version = 0; | 131 | file->f_version = 0; |
132 | file->private_data = priv; | 132 | file->private_data = priv; |
133 | 133 | ||