| 3728 | } |
| 3729 | |
| 3730 | void Client::close_dir(Dir *dir) |
| 3731 | { |
| 3732 | Inode *in = dir->parent_inode; |
| 3733 | ldout(cct, 15) << __func__ << " dir " << dir << " on " << in << dendl; |
| 3734 | ceph_assert(dir->is_empty()); |
| 3735 | ceph_assert(in->dir == dir); |
| 3736 | ceph_assert(in->dentries.size() < 2); // dirs can't be hard-linked |
| 3737 | if (!in->dentries.empty()) |
| 3738 | in->get_first_parent()->put(); // unpin dentry |
| 3739 | |
| 3740 | delete in->dir; |
| 3741 | in->dir = 0; |
| 3742 | put_inode(in); // unpin inode |
| 3743 | } |
| 3744 | |
| 3745 | /** |
| 3746 | * Don't call this with in==NULL, use get_or_create for that |
nothing calls this directly
no test coverage detected