coredump: factor out the not-ispipe file checks
authorOleg Nesterov <oleg@redhat.com>
Wed, 26 May 2010 21:43:05 +0000 (14:43 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 27 May 2010 16:12:45 +0000 (09:12 -0700)
commitc713541125002b8bc9e681af3b09118e771e2d8a
tree6c85885dc2403b0310ab13e1c21dcb30960ced83
parent04b1c384fbc4e0209e5c1affb67050886376d44b
coredump: factor out the not-ispipe file checks

do_coredump() does a lot of file checks after it opens the file or calls
usermode helper.  But all of these checks are only needed in !ispipe case.

Move this code into the "else" branch and kill the ugly repetitive ispipe
checks.

Signed-off-by: Oleg Nesterov <oleg@redhat.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Neil Horman <nhorman@tuxdriver.com>
Cc: Roland McGrath <roland@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/exec.c