Commit a73914cf authored by Pavel Emelyanov's avatar Pavel Emelyanov

unix: Use queuer id, not ino

The sk-queue.img keeps socket IDs as recepient descriptor. For
SCM code we'll need to find the unix sk info who is the sender
for a particular other socket by this ID. There's already the
queuer field in the unix_sk_info, but it needs to be an ID
rather than inode. Fortunately, id-inode pairs are unique.
Reviewed-by: 's avatarKirill Tkhai <ktkhai@virtuozzo.com>
Signed-off-by: 's avatarPavel Emelyanov <xemul@virtuozzo.com>
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 4bf3942a
......@@ -974,7 +974,7 @@ static int post_open_unix_sk(struct file_desc *d, int fd)
revert_unix_sk_cwd(&cwd_fd, &root_fd);
if (peer->queuer == ui->ue->ino && restore_sk_queue(fd, peer->ue->id))
if (peer->queuer == ui->ue->id && restore_sk_queue(fd, peer->ue->id))
return -1;
return restore_sk_common(fd, ui);
......@@ -1458,7 +1458,7 @@ static void set_peer(struct unix_sk_info *ui, struct unix_sk_info *peer)
ui->peer = peer;
list_add(&ui->node, &peer->connected);
if (!peer->queuer)
peer->queuer = ui->ue->ino;
peer->queuer = ui->ue->id;
}
static void interconnected_pair(struct unix_sk_info *ui, struct unix_sk_info *peer)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment