Whamcloud - gitweb
LU-5938 mdd: fixed oops when dereferencing structure
[fs/lustre-release.git] / lustre / mdd / mdd_dir.c
index be38034..4532bcd 100644 (file)
@@ -813,9 +813,9 @@ int mdd_changelog_ns_store(const struct lu_env *env,
                RETURN(-ENOMEM);
        rec = buf->lb_buf;
 
-       crf = (crf & CLF_FLAGMASK);
+       crf &= CLF_FLAGMASK;
 
-       if (uc->uc_jobid[0] != '\0')
+       if (uc != NULL && uc->uc_jobid[0] != '\0')
                crf |= CLF_JOBID;
 
        if (sname != NULL)