In flush_l2_cache() we are using ext2fs_llseek() however we do not
properly detect the error code returned from the function, because we
are assigning it into ULL variable, hence we will not see negative
values.
Fix this by changing the type of the variable to ext2_loff_t which is
signed and hence will store negative values.
Signed-off-by: Lukas Czerner <lczerner@redhat.com>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
static void flush_l2_cache(struct ext2_qcow2_image *image)
{
- blk64_t offset, seek = 0;
+ blk64_t seek = 0;
+ ext2_loff_t offset;
struct ext2_qcow2_l2_cache *cache = image->l2_cache;
struct ext2_qcow2_l2_table *table = cache->used_head;
int fd = image->fd;