librbd: clarify handle_sparse_read condition

The earlier condition is >. != means < at this point, and the nesting
is unnecessary.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
This commit is contained in:
Josh Durgin 2012-04-23 11:58:57 -07:00
parent 2bdaba4f01
commit e17b5a85be

View File

@ -1701,11 +1701,9 @@ ssize_t handle_sparse_read(CephContext *cct,
buf_ofs += gap;
buf_left -= gap;
block_ofs = extent_ofs;
} else {
if (extent_ofs != block_ofs) {
assert(0 == "osd returned data prior to what we asked for");
return -EIO;
}
} else if (extent_ofs < block_ofs) {
assert(0 == "osd returned data prior to what we asked for");
return -EIO;
}
if (bl_ofs + extent_len > (buf_ofs + buf_left)) {