Message ID | 1488992412-25310-1-git-send-email-fdmanana@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 2d0d7c6..7058ae4 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -590,8 +590,10 @@ static noinline void compress_file_range(struct inode *inode, PAGE_SET_WRITEBACK | page_error_op | PAGE_END_WRITEBACK); - btrfs_free_reserved_data_space_noquota(inode, start, - end - start + 1); + if (ret == 0) + btrfs_free_reserved_data_space_noquota(inode, + start, + end - start + 1); goto free_pages_out; } }