mdc_pack_req_body(req, REQ_REC_OFF, valid, fid, oc, ea_size,
MDS_BFLAG_EXT_FLAGS/*request "new" flags(bug 9486)*/);
+ if (valid & OBD_MD_FLRMTPERM)
+ acl_size = sizeof(struct mdt_remote_perm);
/* currently only root inode will call us with FLACL */
- if (valid & OBD_MD_FLACL)
+ else if (valid & OBD_MD_FLACL)
acl_size = LUSTRE_POSIX_ACL_MAX_SIZE;
rc = mdc_getattr_common(exp, ea_size, acl_size,
}
rc = 0;
+ /* remote permission */
+ if (md->body->valid & OBD_MD_FLRMTPERM) {
+ md->remote_perm = lustre_msg_buf(req->rq_repmsg, offset++,
+ sizeof(struct mdt_remote_perm));
+ LASSERT(md->remote_perm);
+ }
+
/* for ACL, it's possible that FLACL is set but aclsize is zero. only
* when aclsize != 0 there's an actual segment for ACL in reply
* buffer. */
- if ((md->body->valid & OBD_MD_FLACL) && md->body->aclsize) {
+ else if ((md->body->valid & OBD_MD_FLACL) && md->body->aclsize) {
rc = mdc_unpack_acl(dt_exp, req, md, offset++);
if (rc)
GOTO(out, rc);
}
- /* remote permission */
- if (md->body->valid & OBD_MD_FLRMTPERM) {
- md->remote_perm = lustre_msg_buf(req->rq_repmsg, offset++,
- sizeof(struct mdt_remote_perm));
- LASSERT(md->remote_perm);
- }
-
if (md->body->valid & OBD_MD_FLMDSCAPA) {
struct obd_capa *oc = mdc_unpack_capa(req, offset++);