Message ID | 1642124283-10148-6-git-send-email-jsimmons@infradead.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | lustre: update to OpenSFS Jan 13, 2022 | expand |
diff --git a/fs/lustre/mgc/mgc_request.c b/fs/lustre/mgc/mgc_request.c index 3955d1f..62bf0ea 100644 --- a/fs/lustre/mgc/mgc_request.c +++ b/fs/lustre/mgc/mgc_request.c @@ -937,7 +937,10 @@ static int mgc_target_register(struct obd_export *exp, if (!rc) { rep_mti = req_capsule_server_get(&req->rq_pill, &RMF_MGS_TARGET_INFO); - memcpy(mti, rep_mti, sizeof(*rep_mti)); + if (rep_mti) + memcpy(mti, rep_mti, sizeof(*rep_mti)); + } + if (!rc) { CDEBUG(D_MGC, "register %s got index = %d\n", mti->mti_svname, mti->mti_stripe_index); }