mds: bracket LOCK|AUTH -> PREXLOCK transition with start/finish_locking
Unlike other lock transitions, we are moving to an _unstable_ state and
then taking our (x)lock. That means that if we don't actually finish for
some reason (lock order changes, request is canceled, whatever) we leave
things in an unstable state--in this case, PREXLOCK, where nothing else
will touch it.
Call cancel_lock in drop_locks (or in acquire_locks when the order changes)
to clean up after an aborted lock attempt.
Original but reproduced (though not easily) by multimds collection task
fsstress_thrash_subtrees.yaml.
Fixes: #1425 Signed-off-by: Sage Weil <sage@newdream.net>