for ( ; i < RADIX_TREE_MAP_SIZE; i++) {
if (slot->slots[i] != NULL)
break;
- index &= ~((1 << shift) - 1);
- index += 1 << shift;
+ index &= ~((1UL << shift) - 1);
+ index += 1UL << shift;
if (index == 0)
goto out; /* 32-bit wraparound */
}
BUG_ON(slot->slots[i] == NULL);
break;
}
- index &= ~((1 << shift) - 1);
- index += 1 << shift;
+ index &= ~((1UL << shift) - 1);
+ index += 1UL << shift;
if (index == 0)
goto out; /* 32-bit wraparound */
}
for (tag = 0; tag < RADIX_TREE_TAGS; tag++) {
int idx;
- if (!tags[tag])
- tag_clear(pathp[0].node, tag, pathp[0].offset);
+ if (tags[tag])
+ continue;
+
+ tag_clear(pathp[0].node, tag, pathp[0].offset);
for (idx = 0; idx < RADIX_TREE_TAG_LONGS; idx++) {
if (pathp[0].node->tags[tag][idx]) {