From: Bruno Faccini Date: Sat, 1 Mar 2014 02:16:39 +0000 (-0500) Subject: lustre/ldlm: set l_lvb_type coherent when layout is returned X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=04aa5d15cbd3b288ef4f9fb2ed30cfb734726993;p=openwrt%2Fstaging%2Fblogic.git lustre/ldlm: set l_lvb_type coherent when layout is returned In case layout has been packed into server reply when not requested, lock l_lvb_type must be set accordingly. Signed-off-by: Bruno Faccini Reviewed-on: http://review.whamcloud.com/8270 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4194 Reviewed-by: Jinshan Xiong Reviewed-by: Johann Lombardi Signed-off-by: Oleg Drokin Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c index 3ed020eb89c0..d87048dcc70c 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c @@ -228,6 +228,7 @@ static void ldlm_handle_cp_callback(struct ptlrpc_request *req, lock_res_and_lock(lock); LASSERT(lock->l_lvb_data == NULL); + lock->l_lvb_type = LVB_T_LAYOUT; lock->l_lvb_data = lvb_data; lock->l_lvb_len = lvb_len; unlock_res_and_lock(lock); diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c index 81adc2b82987..b0d0e2a1744e 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c @@ -753,6 +753,7 @@ static int mdc_finish_enqueue(struct obd_export *exp, /* install lvb_data */ lock_res_and_lock(lock); if (lock->l_lvb_data == NULL) { + lock->l_lvb_type = LVB_T_LAYOUT; lock->l_lvb_data = lmm; lock->l_lvb_len = lvb_len; lmm = NULL;