From c19e72aac135677f28b458d50c2b3f82b352a724 Mon Sep 17 00:00:00 2001 From: pschwan Date: Sun, 13 Oct 2002 15:40:02 +0000 Subject: [PATCH] b=599178 - Update ChangeLog for 0.5.14 (oops) - ldlm/ldlm_lock.c: I reordered ldlm_lock2handle before, and in the process inserted a stupid bug; fixed. - bug 599178 (don't permit multiple ldlm setup) fixed --- lustre/ChangeLog | 13 +++++++++++++ lustre/ldlm/ldlm_lock.c | 2 +- lustre/ldlm/ldlm_lockd.c | 7 +++++++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 528c585..2057e1c 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -1,3 +1,16 @@ +2002-10-10 Phil Schwan + * version v0_5_14 + * bug fixes: + - recovery deadlock fix + - rm -rf causes LBUG fix (617817) + - file open by multiple tasks fix (618962) + - directory permissions bugs (602707 and 620007) + - journal_stop fixed with locking (611313) + - O_APPEND failures resolved (618273, perhaps 614459) + - lconf PATH fix (619770) + - IA64 build fix (621450) + - RPC buffer sizes scale with amount of memory + 2002-10-01 Phil Schwan * version v0_5_13 * bug fixes: diff --git a/lustre/ldlm/ldlm_lock.c b/lustre/ldlm/ldlm_lock.c index 069bd2a..28716b5 100644 --- a/lustre/ldlm/ldlm_lock.c +++ b/lustre/ldlm/ldlm_lock.c @@ -332,7 +332,7 @@ struct ldlm_lock *ldlm_handle2lock(struct lustre_handle *handle) if (lock->l_random != handle->cookie) { CERROR("bogus cookie: lock "LPX64", handle "LPX64"\n", lock->l_random, handle->cookie); - GOTO(out, NULL); + GOTO(out2, NULL); } if (!lock->l_resource) { CERROR("trying to lock bogus resource: lock %p\n", lock); diff --git a/lustre/ldlm/ldlm_lockd.c b/lustre/ldlm/ldlm_lockd.c index f74fa53..69cb485 100644 --- a/lustre/ldlm/ldlm_lockd.c +++ b/lustre/ldlm/ldlm_lockd.c @@ -44,6 +44,7 @@ inline unsigned long round_timeout(unsigned long timeout) static struct list_head waiting_locks_list; static spinlock_t waiting_locks_spinlock; static struct timer_list waiting_locks_timer; +static int ldlm_already_setup = 0; static void waiting_locks_callback(unsigned long unused) { @@ -564,6 +565,9 @@ static int ldlm_setup(struct obd_device *obddev, obd_count len, void *buf) int rc, i; ENTRY; + if (ldlm_already_setup) + RETURN(-EALREADY); + MOD_INC_USE_COUNT; /* rc = ldlm_proc_setup(obddev); @@ -595,6 +599,8 @@ static int ldlm_setup(struct obd_device *obddev, obd_count len, void *buf) waiting_locks_timer.data = 0; init_timer(&waiting_locks_timer); + ldlm_already_setup = 1; + RETURN(0); out_thread: @@ -624,6 +630,7 @@ static int ldlm_cleanup(struct obd_device *obddev) ptlrpc_unregister_service(ldlm->ldlm_service); /* ldlm_proc_cleanup(obddev); */ + ldlm_already_setup = 0; MOD_DEC_USE_COUNT; RETURN(0); } -- 1.8.3.1