kernel - Work through some memory leaks in dsched
* Add a uninitbufbio() function to complement initbufbio(). Also move
BUF_LOCKINIT() into initbufbio() and BUF_LOCKFREE() into uninitbufbio().
* There are several device drivers and other places where the struct buf
is still being allocated manually (verses using getpbuf()). These were
kfree()ing the buffer without dealing with e.g. dsched_exit_buf().
Have uninitbufbio() call dsched_exit_buf() and adjust the various manual
allocations/frees of struct buf to call uninitbufbio() before kfree()ing.
Also remove various manual calls to BUF_LOCKFREE() (which is now done
inside uninitbufbio()).
* This should hopefully deal with the memory leaks but there could be a
few left.
Reported-by: "Steve O'Hara-Smith" <steve@sohara.org>