]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
um: remove file sync for stub data
authorBenjamin Berg <benjamin.berg@intel.com>
Sun, 3 Nov 2024 15:05:04 +0000 (16:05 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Thu, 7 Nov 2024 16:36:30 +0000 (17:36 +0100)
There is no need to sync the stub code to "disk" for the other process
to see the correct memory. Drop the fsync there and remove the helper
function.

Signed-off-by: Benjamin Berg <benjamin.berg@intel.com>
Link: https://patch.msgid.link/20241103150506.1367695-3-benjamin@sipsolutions.net
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
arch/um/include/shared/os.h
arch/um/kernel/physmem.c
arch/um/os-Linux/file.c

index d709a24dc6fc83ed4ebce2f8ce60c89c8d1261d3..6c656ef096c99e07e817412f835425d9db54af99 100644 (file)
@@ -145,7 +145,6 @@ extern int os_ioctl_generic(int fd, unsigned int cmd, unsigned long arg);
 extern int os_get_ifname(int fd, char *namebuf);
 extern int os_set_slip(int fd);
 extern int os_mode_fd(int fd, int mode);
-extern int os_fsync_file(int fd);
 
 extern int os_seek_file(int fd, unsigned long long offset);
 extern int os_open_file(const char *file, struct openflags flags, int mode);
index d60df3626727983797e5e4c5ccd654b58c860037..a74f17b033c4175c4c68081ad0dbcd8fe493d609 100644 (file)
@@ -101,7 +101,6 @@ void __init setup_physmem(unsigned long start, unsigned long reserve_end,
         */
        os_seek_file(physmem_fd, __pa(__syscall_stub_start));
        os_write_file(physmem_fd, __syscall_stub_start, PAGE_SIZE);
-       os_fsync_file(physmem_fd);
 
        memblock_add(__pa(start), len);
        memblock_reserve(__pa(start), reserve);
index f1d03cf3957fe820961f2e5b75130c1af2595fdc..a0d01c68ce3ee82d045756bca6dc1e4fe46a7a75 100644 (file)
@@ -255,12 +255,6 @@ void os_close_file(int fd)
 {
        close(fd);
 }
-int os_fsync_file(int fd)
-{
-       if (fsync(fd) < 0)
-           return -errno;
-       return 0;
-}
 
 int os_seek_file(int fd, unsigned long long offset)
 {