From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from userp1040.oracle.com ([156.151.31.81]:42944 "EHLO userp1040.oracle.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754552AbcAWA6k (ORCPT ); Fri, 22 Jan 2016 19:58:40 -0500 Date: Fri, 22 Jan 2016 16:58:28 -0800 From: "Darrick J. Wong" To: viro@ZenIV.linux.org.uk Cc: linux-fsdevel@vger.kernel.org, david@fromorbit.com, linux-api@vger.kernel.org, xfs@oss.sgi.com, ebiggers3@gmail.com Subject: [PATCH] vfs: abort dedupe loop if fatal signals are pending Message-ID: <20160123005828.GB5496@birch.djwong.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-ID: If the program running dedupe receives a fatal signal during the dedupe loop, we should bail out to avoid tying up the system. Signed-off-by: Darrick J. Wong --- fs/read_write.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/read_write.c b/fs/read_write.c index aaaad52..aab334e 100644 --- a/fs/read_write.c +++ b/fs/read_write.c @@ -1617,6 +1617,9 @@ next_file: mnt_drop_write_file(dst_file); next_loop: fdput(dst_fd); + + if (fatal_signal_pending(current)) + goto out; } out: