Merge pull request #581 from arutk/cond_clear

Fix conditional valid bit reset
This commit is contained in:
Adam Rutkowski 2021-10-20 11:19:46 +02:00 committed by GitHub
commit e3a8f98bfa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -237,7 +237,7 @@ static bool _ocf_metadata_clear_valid_if_clean_##type(struct ocf_cache *cache, \
\ \
_raw_bug_on(raw, line); \ _raw_bug_on(raw, line); \
\ \
map[line].valid &= mask & map[line].dirty; \ map[line].valid &= (mask & map[line].dirty) | (~mask); \
\ \
if (map[line].valid) { \ if (map[line].valid) { \
return true; \ return true; \