From: Ingo Molnar Date: Mon, 12 Feb 2007 08:52:26 +0000 (-0800) Subject: [PATCH] close_files(): add scheduling point X-Git-Tag: Ubuntu-5.13.0-19.19~53170^2~176 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=944be0b224724fcbf63c3a3fe3a5478c325a6547;p=mirror_ubuntu-jammy-kernel.git [PATCH] close_files(): add scheduling point close_files() can sometimes take long enough to trigger the soft lockup detector. Cc: Eric Dumazet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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;