BH_Locked prevents anybody from accessing the buffer (if they call
wait_on_buffer, that is). BH_Protected just prevents reuse of the
buffer, and IMHO is a broken feature --- if you want to pin a buffer
against reuse, the correct way should really be to increment b_count
around the critical code.
If my memory isn't deceiving me, I believe the original genesis of
BH_Protected was for the (new) ramdisk driver, which stores its data in
the buffer cache. The reason why b_count wasn't simply just incremented
was because the ramdisk driver wouldn't necessarily know if it had been
incremented already, and incrementing it twice would be a bad thing.
Instead, the ramdisk driver would simply set BH_Protected, and that
would be that.
- Ted