[CRIU] [PATCH criu] netdevconf: remove redundant and unsafe check
Pavel Tikhomirov
ptikhomirov at odin.com
Fri Apr 10 00:12:25 PDT 2015
we don't need this check as just after it we have:
if (ret)
break;
which safely unpackes nde, and closes nlsk and img in case of error
ps: sorry for inconveniences caused by my patchset
Signed-off-by: Pavel Tikhomirov <ptikhomirov at odin.com>
---
net.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/net.c b/net.c
index acd1ca1..3a32b43 100644
--- a/net.c
+++ b/net.c
@@ -478,16 +478,13 @@ static int restore_links(int pid, NetnsEntry **netns)
goto exit;
}
- if (nde->conf) {
+ if (nde->conf)
/*
* optimize restore of devices configuration except lo
* lo is created with namespace and before default is set
* so we cant optimize its restore
*/
ret = ipv4_conf_op(nde->name, nde->conf, CTL_WRITE, nde->type == ND_TYPE__LOOPBACK ? NULL : netns);
- if (ret < 0)
- return ret;
- }
exit:
net_device_entry__free_unpacked(nde, NULL);
if (ret)
--
1.9.3
More information about the CRIU
mailing list