Skip to content

Commit

Permalink
[PATCH] close_files(): add scheduling point
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ingo Molnar authored and Linus Torvalds committed Feb 12, 2007
1 parent 92ba0ee commit 944be0b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion kernel/exit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 944be0b

Please sign in to comment.