Whamcloud - gitweb
Return an LDLM error code from osc_enqueue, just to be clear at the caller
authoradilger <adilger>
Tue, 29 Oct 2002 23:33:59 +0000 (23:33 +0000)
committeradilger <adilger>
Tue, 29 Oct 2002 23:33:59 +0000 (23:33 +0000)
that we are getting back the right thing (ELDLM_OK == 0).

lustre/osc/osc_request.c

index 6cd994e..9e7d257 100644 (file)
@@ -660,7 +660,8 @@ static int osc_enqueue(struct lustre_handle *connh, struct lov_stripe_md *lsm,
         rc = ldlm_lock_match(obddev->obd_namespace, res_id, type, extent,
                              sizeof(extent), mode, lockh);
         if (rc == 1)
-                RETURN(0); /* We already have a lock, and it's referenced */
+                /* We already have a lock, and it's referenced */
+                RETURN(ELDLM_OK);
 
         /* If we're trying to read, we also search for an existing PW lock.  The
          * VFS and page cache already protect us locally, so lots of readers/
@@ -684,7 +685,7 @@ static int osc_enqueue(struct lustre_handle *connh, struct lov_stripe_md *lsm,
                         ldlm_lock_addref(lockh, LCK_PR);
                         ldlm_lock_decref(lockh, LCK_PW);
 
-                        RETURN(0);
+                        RETURN(ELDLM_OK);
                 }
         }