mds: wait unlink to finish to avoid conflict when creating same dentries
If the previous unlink request has been delayed due to some reasons,
and the new creating for the same dentry may fail or new open will
succeeds but new contents wrote to it will be lost.
The kernel client will make sure before the unlink getting the first
reply it won't send the followed create requests for the same dentry.
Here we need to make sure that before the first reply has been sent
out the dentry must be marked as unlinking.
Fixes: https://tracker.ceph.com/issues/55332
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit
d4b9431dfe23a97075766fa2a2b76d7554543b0c)
Conflicts:
src/messages/MDentryUnlink.h