os/bluestore/bluefs: Fix race condition between truncate() and unlink()
It was possible for unlink() to interrupt ongoing truncate().
As the result, unlink() finishes properly, but truncate() is not aware
of it and does:
1) updates file that is already removed
2) releases same allocations again
Now fixed by checking if file is deleted under FILE lock.
https://tracker.ceph.com/issues/70856
Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
(cherry picked from commit
e5f8892a1249a0ce631082d1fbf8884237434a0f)