From 079148b919d0c58b796f9ae98bdb53028dbcd5e7 Mon Sep 17 00:00:00 2001 From: Oleg Nesterov Date: Tue, 30 Apr 2013 15:28:16 -0700 Subject: coredump: factor out the setting of PF_DUMPCORE Cleanup. Every linux_binfmt->core_dump() sets PF_DUMPCORE, move this into zap_threads() called by do_coredump(). Signed-off-by: Oleg Nesterov Acked-by: Mandeep Singh Baines Cc: Neil Horman Cc: "Rafael J. Wysocki" Cc: Tejun Heo Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/coredump.c | 1 + 1 file changed, 1 insertion(+) (limited to 'fs/coredump.c') diff --git a/fs/coredump.c b/fs/coredump.c index aa8ac69a548f..7300e312fb3a 100644 --- a/fs/coredump.c +++ b/fs/coredump.c @@ -299,6 +299,7 @@ static int zap_threads(struct task_struct *tsk, struct mm_struct *mm, if (unlikely(nr < 0)) return nr; + tsk->flags = PF_DUMPCORE; if (atomic_read(&mm->mm_users) == nr + 1) goto done; /* -- cgit v1.2.3