Bläddra i källkod

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>
Wang Xiaoguang 8 år sedan
förälder
incheckning
69ae5e4459
1 ändrade filer med 5 tillägg och 0 borttagningar
  1. 5 0
      fs/btrfs/ioctl.c

+ 5 - 0
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;