mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
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 <[email protected]>
This commit is contained in:
parent
6b4e8085c0
commit
c9c554f214
12 changed files with 27 additions and 36 deletions
8
fs/aio.c
8
fs/aio.c
|
|
@ -234,13 +234,9 @@ static struct file *aio_private_file(struct kioctx *ctx, loff_t nr_pages)
|
|||
path.mnt = mntget(aio_mnt);
|
||||
|
||||
d_instantiate(path.dentry, inode);
|
||||
file = alloc_file(&path, FMODE_READ | FMODE_WRITE, &aio_ring_fops);
|
||||
if (IS_ERR(file)) {
|
||||
file = alloc_file(&path, O_RDWR, &aio_ring_fops);
|
||||
if (IS_ERR(file))
|
||||
path_put(&path);
|
||||
return file;
|
||||
}
|
||||
|
||||
file->f_flags = O_RDWR;
|
||||
return file;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue