浏览代码

Btrfs: fix EINVAL checks in btrfs_clone

btrfs_drop_extents can now return -EINVAL, but only one caller
in btrfs_clone was checking for it.  This adds it to the
caller for inline extents, which is where we really need it.

Signed-off-by: Chris Mason <clm@fb.com>
Chris Mason 11 年之前
父节点
当前提交
3a29bc0928
共有 1 个文件被更改,包括 3 次插入2 次删除
  1. 3 2
      fs/btrfs/ioctl.c

+ 3 - 2
fs/btrfs/ioctl.c

@@ -3163,8 +3163,9 @@ process_slot:
 							 new_key.offset + datal,
 							 1);
 				if (ret) {
-					btrfs_abort_transaction(trans, root,
-								ret);
+					if (ret != -EINVAL)
+						btrfs_abort_transaction(trans,
+							root, ret);
 					btrfs_end_transaction(trans, root);
 					goto out;
 				}