mds: set the correct WRLOCK flag always in wrlock_force()
The wrlock is not like the xlock, which needs to be acquired in
the CInode's auth always, and it is based on the CDir's auths instead.
When a remote_wrlock is acquired and the local MDS will add a lock
item and marks it as REMOTE_WRLOCK. And later when the local MDS try
to force wrlock in the emplace_lock() will just return the existing
lock item without updating the WRLOCK flag. So when cleaning the
requests later it will just release the remote locks and then removes
lock items directly, which will miss releasing the local wrlock
reference.
Fixes: https://tracker.ceph.com/issues/65630
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit
9a6f249b96faed085a7dea251b0fd81a28330025)