> if (buffer_locked(bh))
> return;
> lock_buffer(bh);
>
> But since interrupts are not disabled (IMHO) and no other locks are
> held (IMHO) there is a small (and rather unlikely) window for a
> dead-lock...
the above 2.2 code is 100% safe because we never lock buffers outside of
the big kernel lock. This was the reason why RAID0 broke subtly in 2.3,
because in 2.3 ll_rw_block() is done outside of the big kernel lock as
well.
interrupts can only unlock buffers, so there is no race. We only have to
synchronize with 'system call level' [non-irq, non-bh, non-tasklet, etc.]
code.
Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/