Whamcloud - gitweb
LU-4629 lmv: fix issue found by Klocwork Insight tool
[fs/lustre-release.git] / lustre / lmv / lmv_intent.c
index 771d381..57a6f94 100644 (file)
@@ -143,8 +143,10 @@ static int lmv_intent_remote(struct obd_export *exp, void *lmm,
                it->d.lustre.it_remote_lock_mode = it->d.lustre.it_lock_mode;
        }
 
-       it->d.lustre.it_lock_handle = plock.cookie;
-       it->d.lustre.it_lock_mode = pmode;
+       if (pmode) {
+               it->d.lustre.it_lock_handle = plock.cookie;
+               it->d.lustre.it_lock_mode = pmode;
+       }
 
        EXIT;
 out_free_op_data: