Skip to content

Commit 37c6911

Browse files
benzeajmberg-intel
authored andcommitted
um: remove file sync for stub data
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>
1 parent 2f278b5 commit 37c6911

File tree

3 files changed

+0
-8
lines changed

3 files changed

+0
-8
lines changed

arch/um/include/shared/os.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ extern int os_ioctl_generic(int fd, unsigned int cmd, unsigned long arg);
145145
extern int os_get_ifname(int fd, char *namebuf);
146146
extern int os_set_slip(int fd);
147147
extern int os_mode_fd(int fd, int mode);
148-
extern int os_fsync_file(int fd);
149148

150149
extern int os_seek_file(int fd, unsigned long long offset);
151150
extern int os_open_file(const char *file, struct openflags flags, int mode);

arch/um/kernel/physmem.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@ void __init setup_physmem(unsigned long start, unsigned long reserve_end,
101101
*/
102102
os_seek_file(physmem_fd, __pa(__syscall_stub_start));
103103
os_write_file(physmem_fd, __syscall_stub_start, PAGE_SIZE);
104-
os_fsync_file(physmem_fd);
105104

106105
memblock_add(__pa(start), len);
107106
memblock_reserve(__pa(start), reserve);

arch/um/os-Linux/file.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -255,12 +255,6 @@ void os_close_file(int fd)
255255
{
256256
close(fd);
257257
}
258-
int os_fsync_file(int fd)
259-
{
260-
if (fsync(fd) < 0)
261-
return -errno;
262-
return 0;
263-
}
264258

265259
int os_seek_file(int fd, unsigned long long offset)
266260
{

0 commit comments

Comments
 (0)