Whamcloud - gitweb
LU-7416 osp: check rq_repmsg in osp_request_commit_cb 30/17130/2
authorDi Wang <di.wang@intel.com>
Tue, 10 Nov 2015 10:22:20 +0000 (02:22 -0800)
committerOleg Drokin <oleg.drokin@intel.com>
Mon, 30 Nov 2015 17:18:39 +0000 (17:18 +0000)
Check if rq_repmsg is NULL before retrieving
last committed transno from reply message.

Signed-off-by: Di Wang <di.wang@intel.com>
Change-Id: Ibf1e110e33df333934c65dfcf52870954e936180
Reviewed-on: http://review.whamcloud.com/17130
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
lustre/osp/osp_trans.c

index b055d33..9c2f914 100644 (file)
@@ -949,7 +949,8 @@ static void osp_request_commit_cb(struct ptlrpc_request *req)
                RETURN_EXIT;
 
        oth = thandle_to_osp_thandle(th);
-       if (lustre_msg_get_last_committed(req->rq_repmsg))
+       if (req->rq_repmsg != NULL &&
+           lustre_msg_get_last_committed(req->rq_repmsg))
                last_committed_transno =
                        lustre_msg_get_last_committed(req->rq_repmsg);