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:
@@ -326,7 +326,7 @@ SYSCALL_DEFINE2(memfd_create,
|
||||
goto err_fd;
|
||||
}
|
||||
file->f_mode |= FMODE_LSEEK | FMODE_PREAD | FMODE_PWRITE;
|
||||
file->f_flags |= O_RDWR | O_LARGEFILE;
|
||||
file->f_flags |= O_LARGEFILE;
|
||||
|
||||
if (flags & MFD_ALLOW_SEALING) {
|
||||
file_seals = memfd_file_seals_ptr(file);
|
||||
|
Reference in New Issue
Block a user