MCPcopy Create free account
hub / github.com/ceph/ceph / close_dir

Method close_dir

src/client/Client.cc:3730–3743  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3728}
3729
3730void 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

Callers

nothing calls this directly

Calls 5

get_first_parentMethod · 0.80
is_emptyMethod · 0.45
sizeMethod · 0.45
emptyMethod · 0.45
putMethod · 0.45

Tested by

no test coverage detected