Fixes compiler clarity warnings

Things like assignment inside condition checks and || mixed with &&.
Fixes kref usage

kref_get() returns the kref pointer, not the value after we incref'd.  We could
change this if it is necessary.  I actually do use the kref retval in other
code, though it is when we kref_get_not_zero (when we aren't guaranteed to
succeed).

kref_put() returns TRUE if we are the last one out of the kref, which means the
release was executed.