simfs: Reset op_source in simfs_read_block

If the block is not in cache or if this is the last block of a last
op in the queue, then fs->op_source might be left with the wrong
value.
This commit is contained in:
Andrzej Zaborowski 2011-01-29 01:29:17 +01:00 committed by Marcel Holtmann
parent 863ce7d93a
commit 882c0c2761
1 changed files with 2 additions and 0 deletions

View File

@ -269,6 +269,8 @@ static gboolean sim_fs_op_read_block(gpointer user_data)
int end_block;
unsigned short read_bytes;
fs->op_source = 0;
start_block = op->offset / 256;
end_block = (op->offset + (op->num_bytes - 1)) / 256;