Whamcloud - gitweb
Branch b1_8
authortianzy <tianzy>
Tue, 2 Jun 2009 12:45:57 +0000 (12:45 +0000)
committertianzy <tianzy>
Tue, 2 Jun 2009 12:45:57 +0000 (12:45 +0000)
fix the problem of mds_open_by_fid() being panic in interoperability case
b=19607
i=johann
j=alexander.zarochentsev

lustre/mds/mds_open.c

index 27e9ab6..4ce6dd8 100644 (file)
@@ -910,7 +910,7 @@ static int mds_open_by_fid(struct ptlrpc_request *req, struct ll_fid *fid,
                     (lustre_msg_get_transno(req->rq_reqmsg) >
                      req->rq_export->exp_last_committed) &&
                     (rec->ur_flags & MDS_OPEN_CREAT) &&
-                    pre_versions[0] != 0) {
+                    (pre_versions && pre_versions[0] != 0)) {
                         /* need parent to set version */
                         dparent = mds_fid2dentry(mds, rec->ur_fid1, NULL);
                         if (IS_ERR(dparent)) {