X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Fptlrpc%2Fpack_generic.c;h=f1d8621eeecf607185c79ce0a67887deb62a6b36;hb=f641913a348ec0179cdc599baa93f74aa64f9943;hp=0664de7f77690a2705f240d846efcaf30c4c4a2f;hpb=388111848489ef99b1fa31ce8fef255ab9c08e84;p=fs%2Flustre-release.git diff --git a/lustre/ptlrpc/pack_generic.c b/lustre/ptlrpc/pack_generic.c index 0664de7..f1d8621 100644 --- a/lustre/ptlrpc/pack_generic.c +++ b/lustre/ptlrpc/pack_generic.c @@ -1557,7 +1557,11 @@ void lustre_msg_set_jobid(struct lustre_msg *msg, char *jobid) pb = lustre_msg_buf_v2(msg, MSG_PTLRPC_BODY_OFF, sizeof(struct ptlrpc_body)); LASSERTF(pb, "invalid msg %p: no ptlrpc body!\n", msg); - memcpy(pb->pb_jobid, jobid, JOBSTATS_JOBID_SIZE); + + if (jobid != NULL) + memcpy(pb->pb_jobid, jobid, JOBSTATS_JOBID_SIZE); + else if (pb->pb_jobid[0] == '\0') + lustre_get_jobid(pb->pb_jobid); return; } default: