open Dir for an inode. if it's not open, allocated it (and pin dentry in memory).
| 422 | |
| 423 | // open Dir for an inode. if it's not open, allocated it (and pin dentry in memory). |
| 424 | Dir *Inode::open_dir() |
| 425 | { |
| 426 | if (!dir) { |
| 427 | dir = new Dir(this); |
| 428 | lsubdout(client->cct, client, 15) << "open_dir " << dir << " on " << this << dendl; |
| 429 | ceph_assert(dentries.size() < 2); // dirs can't be hard-linked |
| 430 | if (!dentries.empty()) |
| 431 | get_first_parent()->get(); // pin dentry |
| 432 | iget(); // pin inode |
| 433 | } |
| 434 | return dir; |
| 435 | } |
| 436 | |
| 437 | bool Inode::check_mode(const UserPerm& perms, unsigned want) |
| 438 | { |
no test coverage detected