diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index a7e6690e0946145479043d04f0751b2ff6061581..5b892500309087b78875918608fa3289578a5a04 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -864,7 +864,8 @@ static noinline int cow_file_range(struct inode *inode, if (btrfs_is_free_space_inode(inode)) { WARN_ON_ONCE(1); - return -EINVAL; + ret = -EINVAL; + goto out_unlock; } num_bytes = ALIGN(end - start + 1, blocksize);