count = bh->b_size >> 9;
sector = bh->b_rsector;
/* Uhhuh.. Nasty dead-lock possible here.. */
/* return if it could not be locked (already locked!), cheaper and SMP
safe! */
if (test_and_set_bit(BH_Lock, &bh->b_state)) // if
(!try_lock_buffer(bh))
return;
The earlier fix was a split test
if (buffer_locked(bh))
return;
/* Maybe the above fixes it, and maybe it doesn't boot. Life is
interesting */
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...
Or am I mistaken again...
/RogerL
-- Home page: http://www.norran.net/nra02596/- 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/