Skip to content

Commit

Permalink
Btrfs: fix EINVAL checks in btrfs_clone
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
masoncl committed Apr 7, 2014
1 parent a1ecaab commit 3a29bc0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions fs/btrfs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3a29bc0

Please sign in to comment.