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

Method may_create

src/client/Client.cc:6453–6468  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6451}
6452
6453int Client::may_create(const InodeRef& dir, const UserPerm& perms)
6454{
6455 ldout(cct, 20) << __func__ << " " << *dir << "; " << perms << dendl;
6456#if defined(__linux__)
6457 if (dir->is_dir() && is_inode_locked(dir) && fscrypt_as)
6458 return -ENOKEY;
6459#endif
6460 int r = _getattr_for_perm(dir, perms);
6461 if (r < 0)
6462 goto out;
6463
6464 r = inode_permission(dir, perms, CLIENT_MAY_EXEC | CLIENT_MAY_WRITE);
6465out:
6466 ldout(cct, 3) << __func__ << " " << dir << " = " << r << dendl;
6467 return r;
6468}
6469
6470filepath Client::walk_dentry_result::getpath() const
6471{

Callers

nothing calls this directly

Calls 1

is_dirMethod · 0.45

Tested by

no test coverage detected