[CRIU] [PATCH 15/18] sk-unix: Don't warn if nothing to unlink

Cyrill Gorcunov gorcunov at openvz.org
Sun Apr 9 15:28:47 PDT 2017


If socket is not present when we're cleaning
it up, don't spam log with a message.

Signed-off-by: Cyrill Gorcunov <gorcunov at openvz.org>
---
 criu/sk-unix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/criu/sk-unix.c b/criu/sk-unix.c
index c7aa3099c00c..6178dd97312c 100644
--- a/criu/sk-unix.c
+++ b/criu/sk-unix.c
@@ -1386,7 +1386,7 @@ static void unlink_stale(struct unix_sk_info *ui)
 		return;
 
 	ret = unlinkat(AT_FDCWD, ui->name, 0) ? -1 : 0;
-	if (ret < 0) {
+	if (ret < 0 && errno != ENOENT) {
 		pr_warn("Can't unlink stale socket %#x peer %#x (name %s dir %s)\n",
 			ui->ue->ino, ui->ue->peer,
 			ui->name ? (ui->name[0] ? ui->name : &ui->name[1]) : "-",
-- 
2.7.4



More information about the CRIU mailing list