Skip to content

Commit

Permalink
btrfs: make file clone aware of fatal signals
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Wang Xiaoguang authored and David Sterba committed Oct 24, 2016
1 parent 0b34c26 commit 69ae5e4
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fs/btrfs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -3814,6 +3814,11 @@ static int btrfs_clone(struct inode *src, struct inode *inode,
}
btrfs_release_path(path);
key.offset = next_key_min_offset;

if (fatal_signal_pending(current)) {
ret = -EINTR;
goto out;
}
}
ret = 0;

Expand Down

0 comments on commit 69ae5e4

Please sign in to comment.