Whamcloud - gitweb
Replace RW_LOCK_UNLOCKED() with rwlock_init() as the former doesn't work with
authornikita <nikita>
Sat, 18 Oct 2008 17:34:22 +0000 (17:34 +0000)
committernikita <nikita>
Sat, 18 Oct 2008 17:34:22 +0000 (17:34 +0000)
lockdep.
b=16450

lustre/ChangeLog
lustre/lov/lov_pool.c
lustre/mdt/mdt_handler.c
lustre/obdfilter/filter.c
lustre/ptlrpc/sec.c

index 2c9431a..b7581af 100644 (file)
@@ -1686,6 +1686,12 @@ Description: Add special type for ptlrpc_request interpret functions.
 Details    : Add lu_env parameter to ->rq_interpreter call-back. NULL is passed 
         there. Actual usage will be in CLIO.
 
+Severity   : normal
+Bugzilla   : 16450
+Description: Replace RW_LOCK_UNLOCKED() macro with rwlock_init().
+Details    : Replace RW_LOCK_UNLOCKED() with rwlock_init() as the former
+            doesn't work with lockdep.
+
 --------------------------------------------------------------------------------
 
 2007-08-10         Cluster File Systems, Inc. <info@clusterfs.com>
index fe55794..12115eb 100644 (file)
@@ -280,7 +280,7 @@ int lov_ost_pool_init(struct ost_pool *op, unsigned int count)
                 count = LOV_POOL_INIT_COUNT;
         op->op_array = NULL;
         op->op_count = 0;
-        op->op_rwlock = RW_LOCK_UNLOCKED;
+        rwlock_init(&op->op_rwlock);
         op->op_size = count;
         OBD_ALLOC(op->op_array, op->op_size * sizeof(op->op_array[0]));
         if (op->op_array == NULL) {
index 74b2f11..8e7406a 100644 (file)
@@ -3938,7 +3938,7 @@ static int mdt_init0(const struct lu_env *env, struct mdt_device *m,
                 server_put_mount_2(dev, lmi->lmi_mnt);
         }
 
-        m->mdt_sptlrpc_lock = RW_LOCK_UNLOCKED;
+        rwlock_init(&m->mdt_sptlrpc_lock);
         sptlrpc_rule_set_init(&m->mdt_sptlrpc_rset);
 
         spin_lock_init(&m->mdt_ioepoch_lock);
index 8d664db..8c7fb1c 100644 (file)
@@ -2023,7 +2023,7 @@ int filter_common_setup(struct obd_device *obd, struct lustre_cfg* lcfg,
         CFS_INIT_LIST_HEAD(&filter->fo_llog_list);
         spin_lock_init(&filter->fo_llog_list_lock);
 
-        filter->fo_sptlrpc_lock = RW_LOCK_UNLOCKED;
+        rwlock_init(&filter->fo_sptlrpc_lock);
         sptlrpc_rule_set_init(&filter->fo_sptlrpc_rset);
 
         filter->fo_fl_oss_capa = 0;
index d053bca..d29a21d 100644 (file)
@@ -66,7 +66,7 @@
  * policy registers                            *
  ***********************************************/
 
-static rwlock_t policy_lock = RW_LOCK_UNLOCKED;
+static rwlock_t policy_lock;
 static struct ptlrpc_sec_policy *policies[SPTLRPC_POLICY_MAX] = {
         NULL,
 };
@@ -2307,6 +2307,8 @@ int __init sptlrpc_init(void)
 {
         int rc;
 
+        rwlock_init(&policy_lock);
+
         rc = sptlrpc_gc_start_thread();
         if (rc)
                 goto out;