Whamcloud - gitweb
Branch b_release_1_8_0
authortianzy <tianzy>
Tue, 2 Jun 2009 12:44:35 +0000 (12:44 +0000)
committertianzy <tianzy>
Tue, 2 Jun 2009 12:44:35 +0000 (12:44 +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 1dc20da..31f7178 100644 (file)
@@ -917,7 +917,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)) {