| 471 | |
| 472 | |
| 473 | Client::~Client() |
| 474 | { |
| 475 | ceph_assert(ceph_mutex_is_not_locked(client_lock)); |
| 476 | |
| 477 | // If the task is crashed or aborted and doesn't |
| 478 | // get any chance to run the umount and shutdow. |
| 479 | { |
| 480 | std::scoped_lock l{client_lock}; |
| 481 | tick_thread_stopped = true; |
| 482 | upkeep_cond.notify_one(); |
| 483 | } |
| 484 | |
| 485 | if (upkeeper.joinable()) |
| 486 | upkeeper.join(); |
| 487 | |
| 488 | // It is necessary to hold client_lock, because any inode destruction |
| 489 | // may call into ObjectCacher, which asserts that it's lock (which is |
| 490 | // client_lock) is held. |
| 491 | std::scoped_lock l{client_lock}; |
| 492 | tear_down_cache(); |
| 493 | } |
| 494 | |
| 495 | void Client::tear_down_cache() |
| 496 | { |
nothing calls this directly
no test coverage detected