8b03a60 util: Only have virObjectLock handle virObjectLockable

Authored and Committed by John Ferlan 6 years ago
    util: Only have virObjectLock handle virObjectLockable
    
    Now that virObjectRWLockWrite exists to handle the virObjectRWLockable
    objects, let's restore virObjectLock to only handle virObjectLockable
    class locks. There still exists the possibility that the input @anyobj
    isn't a valid object and the resource isn't truly locked, but that
    also exists before commit id '77f4593b'.
    
    This also restores some logic that commit id '77f4593b' removed
    with respect to a common code path that commit id '10c2bb2b' had
    introduced as virObjectGetLockableObj. This code path merely does
    the same checks as the original virObjectLock commit 'b545f65d',
    but in callable/reusable helper to ensure the @obj at least has
    some validity before using.
    
    Signed-off-by: John Ferlan <jferlan@redhat.com>
    
        
file modified
+23 -14