2
0
mirror of https://github.com/checkpoint-restore/criu synced 2025-09-01 06:45:35 +00:00

rst: Compact file-descs collects a bit

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
This commit is contained in:
Pavel Emelyanov
2013-08-21 01:06:58 +04:00
parent e03ab6b409
commit 9917c4fe34
15 changed files with 19 additions and 44 deletions

View File

@@ -53,13 +53,15 @@ int prepare_shared_fdinfo(void)
return 0;
}
void file_desc_add(struct file_desc *d, u32 id, struct file_desc_ops *ops)
int file_desc_add(struct file_desc *d, u32 id, struct file_desc_ops *ops)
{
d->id = id;
d->ops = ops;
INIT_LIST_HEAD(&d->fd_info_head);
hlist_add_head(&d->hash, &file_desc_hash[id % FDESC_HASH_SIZE]);
return 0; /* this is to make tail-calls in collect_one_foo look nice */
}
struct file_desc *find_file_desc_raw(int type, u32 id)