We want to send link requests to the auth for the new name, not the
target inode. We also want to drop FILE_SHARED caps on new name's
directory.
Signed-off-by: Sage Weil <sage.weil@dreamhost.com>
req->set_filepath(path);
filepath existing(in->ino);
req->set_filepath2(existing);
- req->inode = in;
- req->dentry_drop = CEPH_CAP_FILE_SHARED;
- req->dentry_unless = CEPH_CAP_FILE_EXCL;
- req->inode = in;
+ req->inode = dir;
+ req->inode_drop = CEPH_CAP_FILE_SHARED;
+ req->inode_unless = CEPH_CAP_FILE_EXCL;
+
int res = get_or_create(dir, newname, &req->dentry);
if (res < 0)
return res;