]> git.baikalelectronics.ru Git - kernel.git/commitdiff
vfs: abort dedupe loop if fatal signals are pending
authorDarrick J. Wong <darrick.wong@oracle.com>
Sat, 23 Jan 2016 00:58:28 +0000 (16:58 -0800)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 23 Jan 2016 01:29:55 +0000 (20:29 -0500)
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@oracle.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/read_write.c

index fa05985f700e511e2f8da109153f86e0072ee03a..324ec271cc4e64868c34e3ff2f28ac2c0542475e 100644 (file)
@@ -1656,6 +1656,9 @@ next_file:
                mnt_drop_write_file(dst_file);
 next_loop:
                fdput(dst_fd);
+
+               if (fatal_signal_pending(current))
+                       goto out;
        }
 
 out: