blk_cache: correctly examine return value in write

Ref #1249
This commit is contained in:
Stefan Kalkowski 2014-09-03 15:01:42 +02:00 committed by Norman Feske
parent 1add912df2
commit 41b62e50bb
1 changed files with 3 additions and 3 deletions

View File

@ -416,12 +416,12 @@ class Driver : public Block::Driver
_cache.alloc(block_count * _blk_sz, block_number * _blk_sz);
if ((block_number % _cache_blk_mod()) &&
_stat(block_number, 1, const_cast<char* const>(buffer), packet))
!_stat(block_number, 1, const_cast<char* const>(buffer), packet))
return;
if (((block_number+block_count) % _cache_blk_mod())
&& _stat(block_number+block_count-1, 1,
const_cast<char* const>(buffer), packet))
&& !_stat(block_number+block_count-1, 1,
const_cast<char* const>(buffer), packet))
return;
_cache.write(buffer, block_count * _blk_sz,