[CRIU] [PATCH 12/16] sk-unix: Don't warn about unlinked socket if fs is clear
Cyrill Gorcunov
gorcunov at openvz.org
Fri Dec 9 09:17:12 PST 2016
It's perfectly fine if socket we're about to restore doesn't
exist, thus simply print a detailed warning in case if
some other error happened on cleanup stage.
Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
criu/sk-unix.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/criu/sk-unix.c b/criu/sk-unix.c
index a26a3529974d..8b175ff2333c 100644
--- a/criu/sk-unix.c
+++ b/criu/sk-unix.c
@@ -1342,8 +1342,8 @@ static void unlink_stale(struct unix_sk_info *ui)
return;
ret = unlinkat(AT_FDCWD, ui->name, 0) ? -1 : 0;
- if (ret < 0) {
- pr_warn("Can't unlink stale socket %#x peer %#x (name %s dir %s)\n",
+ if (ret < 0 && errno != ENOENT) {
+ pr_warn("Can't unlink stale socket %#x peer %#x (name %s dir %s): %m\n",
ui->ue->ino, ui->ue->peer,
ui->name ? (ui->name[0] ? ui->name : &ui->name[1]) : "-",
ui->name_dir ? ui->name_dir : "-");
--
2.7.4
More information about the CRIU
mailing list