[10/17] unix: Don's spam with warning if nothing to unlink

Submitted by Cyrill Gorcunov on April 1, 2018, 8:07 p.m.

Details

Message ID 20180401200743.18938-11-gorcunov@gmail.com
State New
Series "unix: Add support for ghost unix sockets"
Headers show

Commit Message

Cyrill Gorcunov April 1, 2018, 8:07 p.m.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
---
 criu/sk-unix.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/criu/sk-unix.c b/criu/sk-unix.c
index b948819a839e..fbf175ef0dda 100644
--- a/criu/sk-unix.c
+++ b/criu/sk-unix.c
@@ -1765,7 +1765,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]) : "-",