浏览代码

vfs: abort dedupe loop if fatal signals are pending

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>
Darrick J. Wong 9 年之前
父节点
当前提交
e62e560fc8
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      fs/read_write.c

+ 3 - 0
fs/read_write.c

@@ -1656,6 +1656,9 @@ next_file:
 		mnt_drop_write_file(dst_file);
 		mnt_drop_write_file(dst_file);
 next_loop:
 next_loop:
 		fdput(dst_fd);
 		fdput(dst_fd);
+
+		if (fatal_signal_pending(current))
+			goto out;
 	}
 	}
 
 
 out:
 out: