The
BUF_LOCK()
function locks the given buffer. If the lock is already held this call will
block until it can acquire the lock unless LK_NOWAIT
is set.
Its arguments are:
bp
The buffer to lock.
locktype
Flags controlling the type of lock. See
lockmgr(9) for details.