linux-api.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] vfs: abort dedupe loop if fatal signals are pending
@ 2016-01-23  0:58 Darrick J. Wong
       [not found] ` <20160123005828.GB5496-PTl6brltDGh4DFYR7WNSRA@public.gmane.org>
  0 siblings, 1 reply; 2+ messages in thread
From: Darrick J. Wong @ 2016-01-23  0:58 UTC (permalink / raw)
  To: viro-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn
  Cc: linux-fsdevel-u79uwXL29TY76Z2rM5mHXA,
	david-FqsqvQoI3Ljby3iVrkZq2A, linux-api-u79uwXL29TY76Z2rM5mHXA,
	xfs-VZNHf3L845pBDgjK7y7TUQ, ebiggers3-Re5JQEeQqe8AvxtiuMwx3w

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 <darrick.wong-QHcLZuEGTsvQT0dZR+AlfA@public.gmane.org>
---
 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:

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] vfs: abort dedupe loop if fatal signals are pending
       [not found] ` <20160123005828.GB5496-PTl6brltDGh4DFYR7WNSRA@public.gmane.org>
@ 2016-01-23  1:30   ` Al Viro
  0 siblings, 0 replies; 2+ messages in thread
From: Al Viro @ 2016-01-23  1:30 UTC (permalink / raw)
  To: Darrick J. Wong
  Cc: linux-fsdevel-u79uwXL29TY76Z2rM5mHXA,
	david-FqsqvQoI3Ljby3iVrkZq2A, linux-api-u79uwXL29TY76Z2rM5mHXA,
	xfs-VZNHf3L845pBDgjK7y7TUQ, ebiggers3-Re5JQEeQqe8AvxtiuMwx3w

On Fri, Jan 22, 2016 at 04:58:28PM -0800, Darrick J. Wong wrote:
> If the program running dedupe receives a fatal signal during the
> dedupe loop, we should bail out to avoid tying up the system.

Applied.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-01-23  1:30 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-01-23  0:58 [PATCH] vfs: abort dedupe loop if fatal signals are pending Darrick J. Wong
     [not found] ` <20160123005828.GB5496-PTl6brltDGh4DFYR7WNSRA@public.gmane.org>
2016-01-23  1:30   ` Al Viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).