diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2018-07-11 20:19:04 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2018-07-12 16:02:57 +0200 |
commit | c9c554f21490bbc96cc554f80024d27d09670480 (patch) | |
tree | f680bcb2253cf658a7a925d0eb20f2dff71c1f1f /mm/shmem.c | |
parent | make sure do_dentry_open() won't return positive as an error (diff) | |
download | linux-c9c554f21490bbc96cc554f80024d27d09670480.tar.xz linux-c9c554f21490bbc96cc554f80024d27d09670480.zip |
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 'mm/shmem.c')
-rw-r--r-- | mm/shmem.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/shmem.c b/mm/shmem.c index 2cab84403055..84844e52bf24 100644 --- a/mm/shmem.c +++ b/mm/shmem.c @@ -3942,8 +3942,7 @@ static struct file *__shmem_file_setup(struct vfsmount *mnt, const char *name, l if (IS_ERR(res)) goto put_path; - res = alloc_file(&path, FMODE_WRITE | FMODE_READ, - &shmem_file_operations); + res = alloc_file(&path, O_RDWR, &shmem_file_operations); if (IS_ERR(res)) goto put_path; |