summaryrefslogtreecommitdiffstats
path: root/fs/hugetlbfs
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/hugetlbfs
parent6b4e8085c0004382b985a5c005c685073630e746 (diff)
downloadlinux-c9c554f21490bbc96cc554f80024d27d09670480.tar.gz
linux-c9c554f21490bbc96cc554f80024d27d09670480.tar.bz2
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 'fs/hugetlbfs')
-rw-r--r--fs/hugetlbfs/inode.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index d508c7844681..71aed47422e2 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -1375,8 +1375,7 @@ struct file *hugetlb_file_setup(const char *name, size_t size,
inode->i_size = size;
clear_nlink(inode);
- file = alloc_file(&path, FMODE_WRITE | FMODE_READ,
- &hugetlbfs_file_operations);
+ file = alloc_file(&path, O_RDWR, &hugetlbfs_file_operations);
if (IS_ERR(file))
goto out_dentry; /* inode is already attached */