req->r_direct_mode = USE_AUTH_MDS;
req->r_direct_hash = frag_value(frag);
req->r_direct_is_hash = true;
- req->r_path2 = fi->last_name;
+ req->r_path2 = kstrdup(fi->last_name, GFP_NOFS);
req->r_readdir_offset = fi->next_offset;
req->r_args.readdir.frag = cpu_to_le32(frag);
req->r_args.readdir.max_entries = cpu_to_le32(max_entries);
}
req->r_dentry = dget(dentry);
req->r_num_caps = 2;
- req->r_path2 = dest;
+ req->r_path2 = kstrdup(dest, GFP_NOFS);
req->r_locked_dir = dir;
req->r_dentry_drop = CEPH_CAP_FILE_SHARED;
req->r_dentry_unless = CEPH_CAP_FILE_EXCL;
if (IS_ERR(req))
return ERR_PTR(PTR_ERR(req));
- req->r_path1 = "";
req->r_ino1 = fh->ino;
snprintf(path2, BUF_SIZE, "%d", hash);
- req->r_path2 = "";
req->r_ino2 = fh->parent_ino;
req->r_num_caps = 1;
err = ceph_mdsc_do_request(mdsc, NULL, req);
req->r_inode_drop = CEPH_CAP_XATTR_SHARED;
req->r_num_caps = 1;
req->r_args.setxattr.flags = cpu_to_le32(flags);
- req->r_path2 = name;
+ req->r_path2 = kstrdup(name, GFP_NOFS);
req->r_pages = pages;
req->r_num_pages = nr_pages;
req->r_inode = igrab(inode);
req->r_inode_drop = CEPH_CAP_XATTR_SHARED;
req->r_num_caps = 1;
- req->r_path2 = name;
+ req->r_path2 = kstrdup(name, GFP_NOFS);
err = ceph_mdsc_do_request(mdsc, parent_inode, req);
ceph_mdsc_put_request(req);
CEPH_CAP_PIN);
dput(req->r_old_dentry);
}
+ kfree(req->r_path1);
+ kfree(req->r_path2);
put_request_sessions(req);
ceph_unreserve_caps(&req->r_caps_reservation);
kfree(req);
req = ceph_mdsc_create_request(mdsc, CEPH_MDS_OP_GETATTR, USE_ANY_MDS);
if (IS_ERR(req))
return ERR_PTR(PTR_ERR(req));
- req->r_path1 = path;
+ req->r_path1 = kstrdup(path, GFP_NOFS);
req->r_ino1.ino = CEPH_INO_ROOT;
req->r_ino1.snap = CEPH_NOSNAP;
req->r_started = started;