Whamcloud - gitweb
update b_v26 from HEAD (20040308_1423)
authorericm <ericm>
Mon, 8 Mar 2004 06:32:06 +0000 (06:32 +0000)
committerericm <ericm>
Mon, 8 Mar 2004 06:32:06 +0000 (06:32 +0000)
lustre/ldlm/ldlm_flock.c
lustre/ldlm/ldlm_plain.c

index 181c72e..148be59 100644 (file)
@@ -150,6 +150,8 @@ ldlm_process_flock_lock(struct ldlm_lock *req, int *flags, int first_enq,
                         }
                 }
         } else {
+                lockmode_verify(mode);
+
                 /* This loop determines if there are existing locks
                  * that conflict with the new lock request. */
                 list_for_each(tmp, &res->lr_granted) {
@@ -164,7 +166,7 @@ ldlm_process_flock_lock(struct ldlm_lock *req, int *flags, int first_enq,
                         /* locks are compatible, overlap doesn't matter */
                         if (lockmode_compat(lock->l_granted_mode, mode))
                                 continue;
-                        
+
                         if (!ldlm_flocks_overlap(lock, req))
                                 continue;
 
index 9b2af34..9a693e3 100644 (file)
@@ -43,6 +43,8 @@ ldlm_plain_compat_queue(struct list_head *queue, struct ldlm_lock *req,
         int compat = 1;
         ENTRY;
 
+        lockmode_verify(req_mode);
+
         list_for_each(tmp, queue) {
                 lock = list_entry(tmp, struct ldlm_lock, l_res_link);