Whamcloud - gitweb
b=20748
[fs/lustre-release.git] / lustre / lclient / lcommon_cl.c
index d2a4d18..9eb6bbb 100644 (file)
@@ -601,7 +601,6 @@ int ccc_lock_wait(const struct lu_env *env, const struct cl_lock_slice *slice)
  * cached lock "fits" into io.
  *
  * \param slice lock to be checked
- *
  * \param io    IO that wants a lock.
  *
  * \see lov_lock_fits_into().
@@ -625,7 +624,8 @@ int ccc_lock_fits_into(const struct lu_env *env,
          * doesn't enqueue CLM_WRITE sub-locks.
          */
         if (cio->cui_glimpse)
-                result = descr->cld_mode != CLM_WRITE;
+                result = descr->cld_mode == CLM_PHANTOM;
+
         /*
          * Also, don't match incomplete write locks for read, otherwise read
          * would enqueue missing sub-locks in the write mode.