From 15925de41fee651c69f367e58df581c890136d46 Mon Sep 17 00:00:00 2001 From: adilger Date: Tue, 29 Oct 2002 23:33:59 +0000 Subject: [PATCH] Return an LDLM error code from osc_enqueue, just to be clear at the caller that we are getting back the right thing (ELDLM_OK == 0). --- lustre/osc/osc_request.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index 6cd994e..9e7d257 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -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); } } -- 1.8.3.1