[22/28] seccomp: collect_filters -- Drop unneeded parent

Submitted by Cyrill Gorcunov on March 20, 2018, 9:43 p.m.

Details

Message ID 20180320214313.25326-23-gorcunov@gmail.com
State Rejected
Series "seccomp, v2: Add support for per-thread tracking"
Headers show

Commit Message

Cyrill Gorcunov March 20, 2018, 9:43 p.m.
From: Cyrill Gorcunov <gorcunov@openvz.org>

Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
---
 criu/seccomp.c | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

Patch hide | download patch | download mbox

diff --git a/criu/seccomp.c b/criu/seccomp.c
index 658e9b399ab6..90484cde5cb5 100644
--- a/criu/seccomp.c
+++ b/criu/seccomp.c
@@ -267,18 +267,12 @@  static void try_use_tsync(struct seccomp_entry *leader, struct pstree_item *item
 
 static int collect_filters(struct pstree_item *item)
 {
-	struct seccomp_entry *parent, *leader, *entry;
+	struct seccomp_entry *leader, *entry;
 	size_t i;
 
 	if (item->pid->state == TASK_DEAD)
 		return 0;
 
-	parent = item->parent ? seccomp_find_entry(item->parent->pid->real) : NULL;
-	if (!parent && item->parent) {
-		pr_err("Can't collect filter on parent tid_real %d\n",
-		       item->parent->pid->real);
-		return -1;
-	}
 	leader = seccomp_find_entry(item->pid->real);
 	if (!leader) {
 		pr_err("Can't collect filter on leader tid_real %d\n",