Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3a29bc09 authored by Chris Mason's avatar Chris Mason
Browse files

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: default avatarChris Mason <clm@fb.com>
parent a1ecaabb
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -3163,8 +3163,9 @@ static int btrfs_clone(struct inode *src, struct inode *inode,
							 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;
				}