2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-08-31 06:15:24 +00:00

service: Put service sk inode into separate variable

I'm about to get rid of service state struct.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Pavel Emelyanov
2013-09-28 06:06:53 +04:00
parent 14559435f5
commit cfe72ab77a
3 changed files with 5 additions and 8 deletions

View File

@@ -88,11 +88,6 @@ static void show_one_unix_img(const char *act, const UnixSkEntry *e)
act, e->id, e->ino, e->peer, e->type, e->state, (int)e->name.len);
}
static bool service_socket(unsigned int sk_ino)
{
return cr_service_client && (cr_service_client->sk_ino == sk_ino);
}
static int can_dump_unix_sk(const struct unix_sk_desc *sk)
{
/*
@@ -156,7 +151,7 @@ static int dump_one_unix_fd(int lfd, u32 id, const struct fd_parms *p)
* Check if this socket is connected to criu service.
* Dump it like closed one and mark it for restore.
*/
if (service_socket(ue.peer)) {
if (unlikely(ue.peer == service_sk_ino)) {
ue.state = TCP_CLOSE;
ue.peer = 0;
ue.uflags |= USK_SERVICE;