client: Fix libcephfs aio metadata corruption.
Problem:
With cephfs nfs-ganesha, there were following
asserts hit while doing write on a file.
1. FAILED ceph_assert((bool)_front == (bool)_size)
2. FAILED ceph_assert(cap_refs[c] > 0)
Cause:
In aio path, the client_lock was not being held
in the internal callback after the io is done where
it's expected to be taken leading to corruption.
Fix:
Take client_lock in the callback
Fixes: https://tracker.ceph.com/issues/68146
Signed-off-by: Kotresh HR <khiremat@redhat.com>
(cherry picked from commit
3ebe97484d26cf5d9cd78636ee4718c075a2897b)