diff options
author | Ingo Molnar <mingo@elte.hu> | 2007-02-12 03:52:26 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-12 12:48:30 -0500 |
commit | 944be0b224724fcbf63c3a3fe3a5478c325a6547 (patch) | |
tree | 83877201ca028cf0ad3d7ee74d06c26d2dfde95e | |
parent | 92ba0ee2770ed4954e3f8ba412ef2f37e5519477 (diff) |
[PATCH] close_files(): add scheduling point
close_files() can sometimes take long enough to trigger the soft lockup
detector.
Cc: Eric Dumazet <dada1@cosmosbay.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | kernel/exit.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/kernel/exit.c b/kernel/exit.c index bc71fdfcd8a7..14f17033f563 100644 --- a/kernel/exit.c +++ b/kernel/exit.c | |||
@@ -430,8 +430,10 @@ static void close_files(struct files_struct * files) | |||
430 | while (set) { | 430 | while (set) { |
431 | if (set & 1) { | 431 | if (set & 1) { |
432 | struct file * file = xchg(&fdt->fd[i], NULL); | 432 | struct file * file = xchg(&fdt->fd[i], NULL); |
433 | if (file) | 433 | if (file) { |
434 | filp_close(file, files); | 434 | filp_close(file, files); |
435 | cond_resched(); | ||
436 | } | ||
435 | } | 437 | } |
436 | i++; | 438 | i++; |
437 | set >>= 1; | 439 | set >>= 1; |