| 6451 | } |
| 6452 | |
| 6453 | int 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); |
| 6465 | out: |
| 6466 | ldout(cct, 3) << __func__ << " " << dir << " = " << r << dendl; |
| 6467 | return r; |
| 6468 | } |
| 6469 | |
| 6470 | filepath Client::walk_dentry_result::getpath() const |
| 6471 | { |