mirror of
https://github.com/systemd/systemd.git
synced 2024-12-23 21:35:11 +03:00
fileio: sync directory after rename, too
This commit is contained in:
parent
cbffdcecae
commit
5b3f4a20ea
@ -202,6 +202,13 @@ static int write_string_file_atomic(
|
||||
goto fail;
|
||||
}
|
||||
|
||||
if (FLAGS_SET(flags, WRITE_STRING_FILE_SYNC)) {
|
||||
/* Sync the rename, too */
|
||||
r = fsync_directory_of_file(fileno(f));
|
||||
if (r < 0)
|
||||
return r;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
|
Loading…
Reference in New Issue
Block a user