Whamcloud - gitweb
LU-1431 ptlrpc: PTLRPC_BRW_MAX_SIZE usage cleanup.
[fs/lustre-release.git] / lustre / ldlm / ldlm_request.c
index f98c8dd..74d775d 100644 (file)
@@ -643,14 +643,14 @@ int ldlm_cli_enqueue_fini(struct obd_export *exp, struct ptlrpc_request *req,
                                 GOTO(cleanup, rc = -ENOMEM);
                         LDLM_DEBUG(lock, "client-side enqueue, new resource");
                 }
-                if (with_policy)
-                        if (!(type == LDLM_IBITS && !(exp->exp_connect_flags &
-                                                    OBD_CONNECT_IBITS)))
-                                /* We assume lock type cannot change on server*/
-                                ldlm_convert_policy_to_local(exp,
-                                                lock->l_resource->lr_type,
-                                                &reply->lock_desc.l_policy_data,
-                                                &lock->l_policy_data);
+               if (with_policy)
+                       if (!(type == LDLM_IBITS &&
+                             !(exp_connect_flags(exp) & OBD_CONNECT_IBITS)))
+                               /* We assume lock type cannot change on server*/
+                               ldlm_convert_policy_to_local(exp,
+                                               lock->l_resource->lr_type,
+                                               &reply->lock_desc.l_policy_data,
+                                               &lock->l_policy_data);
                 if (type != LDLM_PLAIN)
                         LDLM_DEBUG(lock,"client-side enqueue, new policy data");
         }
@@ -887,7 +887,8 @@ int ldlm_cli_enqueue(struct obd_export *exp, struct ptlrpc_request **reqp,
                          * inodebits lock internally with both bits set.
                          */
                         if (einfo->ei_type == LDLM_IBITS &&
-                            !(exp->exp_connect_flags & OBD_CONNECT_IBITS))
+                           !(exp_connect_flags(exp) &
+                             OBD_CONNECT_IBITS))
                                 lock->l_policy_data.l_inodebits.bits =
                                         MDS_INODELOCK_LOOKUP |
                                         MDS_INODELOCK_UPDATE;