From c98a7d9fa94520280d2bbd1e7287ae808b43a5a9 Mon Sep 17 00:00:00 2001 From: adilger Date: Wed, 20 Aug 2008 09:02:14 +0000 Subject: [PATCH] Branch b1_8 Revert patch landed directly to b1_8 but not b1_8_gate. b=15812 --- lustre/ldlm/ldlm_lock.c | 1 - lustre/llite/file.c | 6 ++---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/lustre/ldlm/ldlm_lock.c b/lustre/ldlm/ldlm_lock.c index 1225f2c..2c25f41 100644 --- a/lustre/ldlm/ldlm_lock.c +++ b/lustre/ldlm/ldlm_lock.c @@ -193,7 +193,6 @@ void ldlm_lock_add_to_lru_nolock(struct ldlm_lock *lock) struct ldlm_namespace *ns = lock->l_resource->lr_namespace; lock->l_last_used = cfs_time_current(); LASSERT(list_empty(&lock->l_lru)); - LASSERT(lock->l_resource->lr_type != LDLM_FLOCK); list_add_tail(&lock->l_lru, &ns->ns_unused_list); LASSERT(ns->ns_nr_unused >= 0); ns->ns_nr_unused++; diff --git a/lustre/llite/file.c b/lustre/llite/file.c index 2487e6a..2031dc4 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -2744,12 +2744,10 @@ int ll_file_flock(struct file *file, int cmd, struct file_lock *file_lock) rc = ldlm_cli_enqueue(sbi->ll_mdc_exp, NULL, &einfo, res_id, &flock, &flags, NULL, 0, NULL, &lockh, 0); - if ((file_lock->fl_flags & FL_FLOCK) && - (rc == 0 || file_lock->fl_type == F_UNLCK)) + if ((file_lock->fl_flags & FL_FLOCK) && (rc == 0)) ll_flock_lock_file_wait(file, file_lock, (cmd == F_SETLKW)); #ifdef HAVE_F_OP_FLOCK - if ((file_lock->fl_flags & FL_POSIX) && - (rc == 0 || file_lock->fl_type == F_UNLCK) && + if ((file_lock->fl_flags & FL_POSIX) && (rc == 0) && !(flags & LDLM_FL_TEST_LOCK)) posix_lock_file_wait(file, file_lock); #endif -- 1.8.3.1