diff options
author | Wang Xiaoguang <wangxg.fnst@cn.fujitsu.com> | 2016-10-13 09:23:39 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-06 11:16:11 +0100 |
commit | 85cfbd9db2c6e0d213e5c28b04c8ca1820000533 (patch) | |
tree | bb6b073368cb266abfb8216aa64bfca9f81737c1 | |
parent | 323ffc03ddb2007fbfda0e3c3b749edfc7053e67 (diff) | |
download | linux-stable-85cfbd9db2c6e0d213e5c28b04c8ca1820000533.tar.gz linux-stable-85cfbd9db2c6e0d213e5c28b04c8ca1820000533.tar.bz2 linux-stable-85cfbd9db2c6e0d213e5c28b04c8ca1820000533.zip |
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 <wangxg.fnst@cn.fujitsu.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | fs/btrfs/ioctl.c | 5 |
1 files changed, 5 insertions, 0 deletions
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; |