if (reqbody == NULL || repbody == NULL)
RETURN(err_serious(-EFAULT));
- rc = mdt_init_ucred(info, reqbody);
- if (rc)
- RETURN(rc);
-
/*
* prepare @rdpg before calling lower layers and transfer itself. Here
* reqbody->size contains offset of where to start to read and
if ((__u64)rdpg->rp_hash != reqbody->size) {
CERROR("Invalid hash: %#llx != %#llx\n",
(__u64)rdpg->rp_hash, reqbody->size);
- GOTO(out, rc = -EFAULT);
+ RETURN(-EFAULT);
}
rdpg->rp_count = reqbody->nlink;
rdpg->rp_npages = (rdpg->rp_count + CFS_PAGE_SIZE - 1)>>CFS_PAGE_SHIFT;
OBD_ALLOC(rdpg->rp_pages, rdpg->rp_npages * sizeof rdpg->rp_pages[0]);
if (rdpg->rp_pages == NULL)
- GOTO(out, rc = -ENOMEM);
+ RETURN(-ENOMEM);
for (i = 0; i < rdpg->rp_npages; ++i) {
rdpg->rp_pages[i] = alloc_pages(GFP_KERNEL, 0);
__free_pages(rdpg->rp_pages[i], 0);
OBD_FREE(rdpg->rp_pages, rdpg->rp_npages * sizeof rdpg->rp_pages[0]);
- mdt_exit_ucred(info);
MDT_FAIL_RETURN(OBD_FAIL_MDS_SENDPAGE, 0);
-out:
- mdt_exit_ucred(info);
return rc ? rc : rc1;
}
uc->mu_fsuid = rec->sa_fsuid;
uc->mu_fsgid = rec->sa_fsgid;
- uc->mu_uid = rec->sa_uid;
- uc->mu_gid = rec->sa_gid;
uc->mu_cap = rec->sa_cap;
uc->mu_suppgids[0] = rec->sa_suppgid;
uc->mu_suppgids[1] = -1;
struct md_attr *ma = &info->mti_attr;
struct lu_attr *la = &ma->ma_attr;
struct mdt_file_data *mfd;
- const struct mdt_body *reqbody = info->mti_body;
struct mdt_body *repbody;
int rc = 0;
int isreg, isdir, islnk;
mdt_pack_attr2body(repbody, la, mdt_object_fid(o));
mdt_body_reverse_idmap(info, repbody);
- if (med->med_rmtclient && (reqbody->valid & OBD_MD_FLRMTPERM)) {
+ if (med->med_rmtclient) {
void *buf = req_capsule_server_get(&info->mti_pill, &RMF_ACL);
rc = mdt_pack_remote_perm(info, o, buf);