From: Wang Xiaoguang Date: Thu, 13 Oct 2016 01:23:39 +0000 (+0800) Subject: btrfs: make file clone aware of fatal signals X-Git-Tag: firefly_0821_release~176^2~4^2~7^2~35 X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=85cfbd9db2c6e0d213e5c28b04c8ca1820000533;p=firefly-linux-kernel-4.4.55.git btrfs: make file clone aware of fatal signals commit 69ae5e4459e43e56f03d0987e865fbac2b05af2a upstream. Indeed this just make the behavior similar to xfs when process has fatal signals pending, and it'll make fstests/generic/298 happy. Signed-off-by: Wang Xiaoguang Reviewed-by: David Sterba Signed-off-by: David Sterba Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index a7e18dbadf74..317b99acdf4b 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -3825,6 +3825,11 @@ process_slot: } btrfs_release_path(path); key.offset = next_key_min_offset; + + if (fatal_signal_pending(current)) { + ret = -EINTR; + goto out; + } } ret = 0;