Theodore Tso wrote:
My bigger concern is given that we are playing games like *this*: if ((cur & 31) == 0 && (len - cur) >= 32) { /* fast path: set whole word at once */ addr = bm + (cur >> 3); *addr = 0xffffffff; cur += 32; continue; }
this is to avoid expensive LOCK prefix in some cases.
without taking a lock, I'm a little surprised we haven't been seriously burned by other race conditions. What's the point of calling mb_set_bit_atomic() and passing in a spinlock if we are doing this kind of check without the protection of the same spinlock?!?
why would we need a lock for a whole word bitop ? thanks, Alex -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html