_inode->truncate_seq = 1; /* starting with 1, 0 is kept for no-truncation logic */
CInode *diri = dir->get_inode();
+ auto pip = diri->get_projected_inode();
- dout(10) << oct << " dir mode 0" << diri->get_inode()->mode << " new mode 0" << mode << dec << dendl;
+ dout(10) << oct << " dir mode 0" << pip->mode << " new mode 0" << mode << dec << dendl;
- if (diri->get_inode()->mode & S_ISGID) {
+ if (pip->mode & S_ISGID) {
dout(10) << " dir is sticky" << dendl;
- _inode->gid = diri->get_inode()->gid;
+ _inode->gid = pip->gid;
if (S_ISDIR(mode)) {
- dout(10) << " new dir also sticky" << dendl;
+ dout(10) << " new dir also sticky" << dendl;
_inode->mode |= S_ISGID;
}
- } else
+ } else {
_inode->gid = mdr->client_request->get_caller_gid();
+ }
_inode->uid = mdr->client_request->get_caller_uid();