summaryrefslogtreecommitdiff
path: root/kernel
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2007-02-12 00:52:26 -0800
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-02-12 09:48:30 -0800
commit944be0b224724fcbf63c3a3fe3a5478c325a6547 (patch)
tree83877201ca028cf0ad3d7ee74d06c26d2dfde95e /kernel
parent92ba0ee2770ed4954e3f8ba412ef2f37e5519477 (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>
Diffstat (limited to 'kernel')
-rw-r--r--kernel/exit.c4
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)
while (set) {
if (set & 1) {
struct file * file = xchg(&fdt->fd[i], NULL);
- if (file)
+ if (file) {
filp_close(file, files);
+ cond_resched();
+ }
}
i++;
set >>= 1;