#include "ethtool-util.h"
#include "fd-util.h"
#include "fileio.h"
+#include "fs-util.h"
#include "ipvlan.h"
#include "missing_network.h"
#include "netlink-util.h"
if (r < 0)
goto fail;
- if (rename(temp_path, link->state_file) < 0) {
- r = -errno;
+ r = conservative_rename(temp_path, link->state_file);
+ if (r < 0)
goto fail;
- }
return 0;
#include "fd-util.h"
#include "fileio.h"
#include "firewall-util.h"
+#include "fs-util.h"
#include "local-addresses.h"
#include "netlink-util.h"
#include "network-internal.h"
if (r < 0)
goto fail;
- if (rename(temp_path, m->state_file) < 0) {
- r = -errno;
+ r = conservative_rename(temp_path, m->state_file);
+ if (r < 0)
goto fail;
- }
if (m->operational_state != operstate) {
m->operational_state = operstate;