summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorWang Xiaoguang <wangxg.fnst@cn.fujitsu.com>2016-10-13 09:23:39 +0800
committerDavid Sterba <dsterba@suse.com>2016-10-24 18:20:29 +0200
commit69ae5e4459e43e56f03d0987e865fbac2b05af2a (patch)
tree76315f47d6f0f4368fa137e99d38023e9319099c /fs
parent0b34c261e235a5c74dcf78bd305845bd15fe2b42 (diff)
btrfs: make file clone aware of fatal signals
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/ioctl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index af69129d7e0e..71634570943c 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -3814,6 +3814,11 @@ process_slot:
}
btrfs_release_path(path);
key.offset = next_key_min_offset;
+
+ if (fatal_signal_pending(current)) {
+ ret = -EINTR;
+ goto out;
+ }
}
ret = 0;