aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/ceph/mds_client.c7
-rw-r--r--fs/ceph/mds_client.h2
2 files changed, 7 insertions, 2 deletions
diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c
index 3142b15940c2..d22fbbef1959 100644
--- a/fs/ceph/mds_client.c
+++ b/fs/ceph/mds_client.c
@@ -529,6 +529,9 @@ static void __register_request(struct ceph_mds_client *mdsc,
529 ceph_mdsc_get_request(req); 529 ceph_mdsc_get_request(req);
530 __insert_request(mdsc, req); 530 __insert_request(mdsc, req);
531 531
532 req->r_uid = current_fsuid();
533 req->r_gid = current_fsgid();
534
532 if (dir) { 535 if (dir) {
533 struct ceph_inode_info *ci = ceph_inode(dir); 536 struct ceph_inode_info *ci = ceph_inode(dir);
534 537
@@ -1588,8 +1591,8 @@ static struct ceph_msg *create_request_message(struct ceph_mds_client *mdsc,
1588 1591
1589 head->mdsmap_epoch = cpu_to_le32(mdsc->mdsmap->m_epoch); 1592 head->mdsmap_epoch = cpu_to_le32(mdsc->mdsmap->m_epoch);
1590 head->op = cpu_to_le32(req->r_op); 1593 head->op = cpu_to_le32(req->r_op);
1591 head->caller_uid = cpu_to_le32(current_fsuid()); 1594 head->caller_uid = cpu_to_le32(req->r_uid);
1592 head->caller_gid = cpu_to_le32(current_fsgid()); 1595 head->caller_gid = cpu_to_le32(req->r_gid);
1593 head->args = req->r_args; 1596 head->args = req->r_args;
1594 1597
1595 ceph_encode_filepath(&p, end, ino1, path1); 1598 ceph_encode_filepath(&p, end, ino1, path1);
diff --git a/fs/ceph/mds_client.h b/fs/ceph/mds_client.h
index d66d63c72355..9341fd4f1432 100644
--- a/fs/ceph/mds_client.h
+++ b/fs/ceph/mds_client.h
@@ -170,6 +170,8 @@ struct ceph_mds_request {
170 170
171 union ceph_mds_request_args r_args; 171 union ceph_mds_request_args r_args;
172 int r_fmode; /* file mode, if expecting cap */ 172 int r_fmode; /* file mode, if expecting cap */
173 uid_t r_uid;
174 gid_t r_gid;
173 175
174 /* for choosing which mds to send this request to */ 176 /* for choosing which mds to send this request to */
175 int r_direct_mode; 177 int r_direct_mode;