i=andrew
i=dmitry
Fix bug found on lol when the group upcall returns EIDRM.
We incorrectly shrink the reply while there is no mds_body.
rc = rc2;
if (rc != 0)
req->rq_status = rc;
+ } else {
+ mds_shrink_body_reply(req, offset, REPLY_REC_OFF);
}
mds_exit_ucred(&uc, mds);
cleanup_exit:
- mds_shrink_body_reply(req, offset, REPLY_REC_OFF);
return rc;
}
/* LSM and cookie is always placed after mds_body */
reply_body = lustre_msg_buf(req->rq_repmsg, reply_mdoff,
sizeof(*reply_body));
+ if (reply_body == NULL)
+ /* if there is no mds_body, no point in shrinking the reply */
+ return;
+
reply_mdoff++;
- if (reply_body && (have_md || have_acl)) {
+ if (have_md || have_acl) {
if (reply_body->valid & (OBD_MD_FLEASIZE | OBD_MD_FLDIREA)) {
md_size = reply_body->eadatasize;
} else if (reply_body->valid & OBD_MD_LINKNAME)