]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/btrfs/inode.c
Btrfs: unlock extent and pages on error in cow_file_range
[karo-tx-linux.git] / fs / btrfs / inode.c
index a7e6690e0946145479043d04f0751b2ff6061581..5b892500309087b78875918608fa3289578a5a04 100644 (file)
@@ -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);