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>
This commit is contained in:
Al Viro
2018-07-11 14:19:04 -04:00
parent 6b4e8085c0
commit c9c554f214
12 changed files with 27 additions and 36 deletions

View File

@@ -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 */