From: Jan Kara Subject: [PATCH 1/2] mm: Make task in balance_dirty_pages() killable Date: Mon, 14 Nov 2011 12:10:29 +0100 Message-ID: <1321269030-6019-2-git-send-email-jack@suse.cz> References: <1321269030-6019-1-git-send-email-jack@suse.cz> Cc: Wu Fengguang , Al Viro , k-mio@sx.jp.nec.com, Andrew Morton , Christoph Hellwig , Jan Kara To: linux-fsdevel@vger.kernel.org Return-path: Received: from cantor2.suse.de ([195.135.220.15]:47444 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754448Ab1KNLLB (ORCPT ); Mon, 14 Nov 2011 06:11:01 -0500 In-Reply-To: <1321269030-6019-1-git-send-email-jack@suse.cz> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: There is no reason why task in balance_dirty_pages() shouldn't be killable and it helps in recovering from some error conditions (like when filesystem goes in error state and cannot accept writeback anymore but we still want to kill processes using it to be able to unmount it). Reported-by: Kazuya Mio Tested-by: Kazuya Mio Signed-off-by: Jan Kara --- mm/page-writeback.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/mm/page-writeback.c b/mm/page-writeback.c index 0360d1b..e83c286 100644 --- a/mm/page-writeback.c +++ b/mm/page-writeback.c @@ -1133,8 +1133,10 @@ pause: pages_dirtied, pause, start_time); - __set_current_state(TASK_UNINTERRUPTIBLE); + __set_current_state(TASK_KILLABLE); io_schedule_timeout(pause); + if (fatal_signal_pending(current)) + break; dirty_thresh = hard_dirty_limit(dirty_thresh); /* -- 1.7.1