mds: always make getattr wait for xlock to be released by the previous client
When the previous client's setattr request is still holding the xlock
for the linklock/authlock/xattrlock/filelock locks, if the same client
send a getattr request it will use the projected inode to fill the
reply, while for other clients the getattr requests will use the
non-projected inode to fill replies. This causes inconsistent file
mode across multiple clients.
This will just skip batching the ops when any of the xlock is held.
Fixes: https://tracker.ceph.com/issues/63906
Signed-off-by: Xiubo Li <xiubli@redhat.com>
(cherry picked from commit
b1ea37c5a6cc7b2dad417128990a6403de9cb170)