From 2bfc03fbcabfad3d4e828ee53cd5cbd0d8ae07da Mon Sep 17 00:00:00 2001 From: Di Wang Date: Tue, 10 Nov 2015 02:22:20 -0800 Subject: [PATCH] LU-7416 osp: check rq_repmsg in osp_request_commit_cb Check if rq_repmsg is NULL before retrieving last committed transno from reply message. Signed-off-by: Di Wang Change-Id: Ibf1e110e33df333934c65dfcf52870954e936180 Reviewed-on: http://review.whamcloud.com/17130 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Alex Zhuravlev Reviewed-by: Lai Siyao Reviewed-by: Oleg Drokin --- lustre/osp/osp_trans.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lustre/osp/osp_trans.c b/lustre/osp/osp_trans.c index b055d33..9c2f9140 100644 --- a/lustre/osp/osp_trans.c +++ b/lustre/osp/osp_trans.c @@ -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); -- 1.8.3.1