[CRIU] [PATCH 15/18] sk-unix: Don't warn if nothing to unlink
Kirill Tkhai
ktkhai at virtuozzo.com
Mon Apr 24 03:44:20 PDT 2017
On 12.04.2017 16:58, Cyrill Gorcunov wrote:
> 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;
It's not a question to your patch, but Q in general list: what if there is a regular file
on the place of deleted unix socket?
> - 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]) : "-",
>
More information about the CRIU
mailing list