aboutsummaryrefslogtreecommitdiffstats
path: root/fs/aio.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2018-07-11 14:19:04 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2018-07-12 10:02:57 -0400
commitc9c554f21490bbc96cc554f80024d27d09670480 (patch)
treef680bcb2253cf658a7a925d0eb20f2dff71c1f1f /fs/aio.c
parent6b4e8085c0004382b985a5c005c685073630e746 (diff)
alloc_file(): switch to passing O_... flags instead of FMODE_... mode
... so that it could set both ->f_flags and ->f_mode, without callers having to set ->f_flags manually. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/aio.c')
-rw-r--r--fs/aio.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/aio.c b/fs/aio.c
index e1d20124ec0e..9eea53887d6c 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -234,13 +234,9 @@ static struct file *aio_private_file(struct kioctx *ctx, loff_t nr_pages)
234 path.mnt = mntget(aio_mnt); 234 path.mnt = mntget(aio_mnt);
235 235
236 d_instantiate(path.dentry, inode); 236 d_instantiate(path.dentry, inode);
237 file = alloc_file(&path, FMODE_READ | FMODE_WRITE, &aio_ring_fops); 237 file = alloc_file(&path, O_RDWR, &aio_ring_fops);
238 if (IS_ERR(file)) { 238 if (IS_ERR(file))
239 path_put(&path); 239 path_put(&path);
240 return file;
241 }
242
243 file->f_flags = O_RDWR;
244 return file; 240 return file;
245} 241}
246 242