Commit 04aa5d15 authored by Bruno Faccini's avatar Bruno Faccini Committed by Greg Kroah-Hartman

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: default avatarBruno Faccini <bruno.faccini@intel.com>
Reviewed-on: http://review.whamcloud.com/8270
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4194Reviewed-by: default avatarJinshan Xiong <jinshan.xiong@intel.com>
Reviewed-by: default avatarJohann Lombardi <johann.lombardi@intel.com>
Signed-off-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f236f69b
...@@ -228,6 +228,7 @@ static void ldlm_handle_cp_callback(struct ptlrpc_request *req, ...@@ -228,6 +228,7 @@ static void ldlm_handle_cp_callback(struct ptlrpc_request *req,
lock_res_and_lock(lock); lock_res_and_lock(lock);
LASSERT(lock->l_lvb_data == NULL); LASSERT(lock->l_lvb_data == NULL);
lock->l_lvb_type = LVB_T_LAYOUT;
lock->l_lvb_data = lvb_data; lock->l_lvb_data = lvb_data;
lock->l_lvb_len = lvb_len; lock->l_lvb_len = lvb_len;
unlock_res_and_lock(lock); unlock_res_and_lock(lock);
......
...@@ -753,6 +753,7 @@ static int mdc_finish_enqueue(struct obd_export *exp, ...@@ -753,6 +753,7 @@ static int mdc_finish_enqueue(struct obd_export *exp,
/* install lvb_data */ /* install lvb_data */
lock_res_and_lock(lock); lock_res_and_lock(lock);
if (lock->l_lvb_data == NULL) { if (lock->l_lvb_data == NULL) {
lock->l_lvb_type = LVB_T_LAYOUT;
lock->l_lvb_data = lmm; lock->l_lvb_data = lmm;
lock->l_lvb_len = lvb_len; lock->l_lvb_len = lvb_len;
lmm = NULL; lmm = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment