Commit 5ed20047 authored by Andrey Vagin's avatar Andrey Vagin Committed by Pavel Emelyanov

dump: clean up shared_fdtable

It's cleaned up accoding with following statements:
* files_id can't be zero (look at dump_task_kobj_ids)
* item->ids is allocated for all non-dead tasks
* a parent can't be dead

In addition here is a tiny coding stype fix.

Fixes: 475bb1e7 ("rst: Evaluate per-task clone mask early")
Signed-off-by: 's avatarAndrey Vagin <avagin@openvz.org>
Signed-off-by: 's avatarPavel Emelyanov <xemul@parallels.com>
parent 33c75d0d
...@@ -32,11 +32,10 @@ struct pstree_item { ...@@ -32,11 +32,10 @@ struct pstree_item {
struct rst_info rst[0]; struct rst_info rst[0];
}; };
static inline int shared_fdtable(struct pstree_item *item) { /* ids is alocated and initialized for all alive tasks */
return (item->parent && item->parent->state != TASK_HELPER && static inline int shared_fdtable(struct pstree_item *item)
item->ids && {
item->parent->ids && return (item->parent &&
item->ids->files_id &&
item->ids->files_id == item->parent->ids->files_id); item->ids->files_id == item->parent->ids->files_id);
} }
......
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