[PATCH] vfs: abort dedupe loop if fatal signals are pending

Subsystems: filesystems (vfs and infrastructure), the rest

STALE3922d

2 messages, 2 authors, 2016-01-23 · open the first message on its own page

[PATCH] vfs: abort dedupe loop if fatal signals are pending

From: Darrick J. Wong <hidden>
Date: 2016-01-23 00:58:40

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 <redacted>
---
 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:

Re: [PATCH] vfs: abort dedupe loop if fatal signals are pending

From: Al Viro <viro@ZenIV.linux.org.uk>
Date: 2016-01-23 01:30:23

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help