Whamcloud - gitweb
use generic CFS_LIST_HEAD macro instead of LIST_HEAD.
authorshadow <shadow>
Thu, 24 Apr 2008 07:07:59 +0000 (07:07 +0000)
committershadow <shadow>
Thu, 24 Apr 2008 07:07:59 +0000 (07:07 +0000)
b=14929
i=zam

lustre/include/liblustre.h
lustre/ldlm/ldlm_lock.c
lustre/liblustre/super.c
lustre/lov/lov_obd.c
lustre/obdclass/class_obd.c
lustre/obdclass/genops.c
lustre/osc/osc_request.c
lustre/ptlrpc/connection.c
lustre/quota/quota_interface.c
lustre/tests/it_test.c

index 64039f0..79b35fd 100644 (file)
@@ -599,9 +599,9 @@ static inline int capable(int cap)
 
 #define DECLARE_WAIT_QUEUE_HEAD(HEAD)                           \
         wait_queue_head_t HEAD = {                              \
-                .sleepers = LIST_HEAD_INIT(HEAD.sleepers)       \
+                .sleepers = CFS_LIST_HEAD_INIT(HEAD.sleepers)       \
         }
-#define init_waitqueue_head(l) INIT_LIST_HEAD(&(l)->sleepers)
+#define init_waitqueue_head(l) CFS_INIT_LIST_HEAD(&(l)->sleepers)
 #define wake_up(l) do { int a = 0; a++; } while (0)
 #define TASK_INTERRUPTIBLE 0
 #define TASK_UNINTERRUPTIBLE 1
@@ -672,7 +672,7 @@ static inline int timer_pending(struct timer_list *l)
 
 static inline int init_timer(struct timer_list *l)
 {
-        INIT_LIST_HEAD(&l->tl_list);
+        CFS_INIT_LIST_HEAD(&l->tl_list);
         return 0;
 }
 
index 2bddda6..b63aaba 100644 (file)
@@ -1483,7 +1483,7 @@ void ldlm_reprocess_all_ns(struct ldlm_namespace *ns)
 
 void ldlm_reprocess_all(struct ldlm_resource *res)
 {
-        struct list_head rpc_list = LIST_HEAD_INIT(rpc_list);
+        CFS_LIST_HEAD(rpc_list);
         int rc;
         ENTRY;
 
@@ -1661,7 +1661,7 @@ void ldlm_cancel_locks_for_export(struct obd_export *exp)
 struct ldlm_resource *ldlm_lock_convert(struct ldlm_lock *lock, int new_mode,
                                         __u32 *flags)
 {
-        struct list_head rpc_list = LIST_HEAD_INIT(rpc_list);
+        CFS_LIST_HEAD(rpc_list);
         struct ldlm_resource *res;
         struct ldlm_namespace *ns;
         int granted = 0;
index cd79894..24b4058 100644 (file)
@@ -1886,7 +1886,7 @@ llu_fsswop_mount(const char *source,
         if (!sbi)
                 RETURN(-ENOMEM);
 
-        INIT_LIST_HEAD(&sbi->ll_conn_chain);
+        CFS_INIT_LIST_HEAD(&sbi->ll_conn_chain);
         ll_generate_random_uuid(uuid);
         class_uuid_unparse(uuid, &sbi->ll_sb_uuid);
 
index ffdab5e..93787c4 100644 (file)
@@ -847,7 +847,7 @@ static int lov_setup(struct obd_device *obd, obd_count len, void *buf)
         lov->lov_tgt_size = 0;
         sema_init(&lov->lov_lock, 1);
         atomic_set(&lov->lov_refcount, 0);
-        INIT_LIST_HEAD(&lov->lov_qos.lq_oss_list);
+        CFS_INIT_LIST_HEAD(&lov->lov_qos.lq_oss_list);
         init_rwsem(&lov->lov_qos.lq_rw_sem);
         lov->lov_qos.lq_dirty = 1;
         lov->lov_qos.lq_dirty_rr = 1;
index b6d7780..0ada5c9 100644 (file)
@@ -551,7 +551,7 @@ int init_obdclass(void)
                 return err;
 
         spin_lock_init(&obd_dev_lock);
-        INIT_LIST_HEAD(&obd_types);
+        CFS_INIT_LIST_HEAD(&obd_types);
 
         err = cfs_psdev_register(&obd_psdev);
         if (err) {
index 88d3dd6..63d52c2 100644 (file)
@@ -1312,7 +1312,7 @@ EXPORT_SYMBOL(obd_zombie_impexp_cull);
 
 void obd_zombie_impexp_init(void)
 {
-        INIT_LIST_HEAD(&obd_zombie_imports);
-        INIT_LIST_HEAD(&obd_zombie_exports);
+        CFS_INIT_LIST_HEAD(&obd_zombie_imports);
+        CFS_INIT_LIST_HEAD(&obd_zombie_exports);
         spin_lock_init(&obd_zombie_impexp_lock);
 }
index eccf227..afc18ba 100644 (file)
@@ -1106,7 +1106,7 @@ static int osc_brw_prep_request(int cmd, struct client_obd *cli,struct obdo *oa,
         aa->aa_resends = 0;
         aa->aa_ppga = pga;
         aa->aa_cli = cli;
-        INIT_LIST_HEAD(&aa->aa_oaps);
+        CFS_INIT_LIST_HEAD(&aa->aa_oaps);
 
         *reqp = req;
         RETURN (0);
@@ -1406,9 +1406,9 @@ int osc_brw_redo_request(struct ptlrpc_request *request,
 
         new_aa = (struct osc_brw_async_args *)&new_req->rq_async_args;
 
-        INIT_LIST_HEAD(&new_aa->aa_oaps);
+        CFS_INIT_LIST_HEAD(&new_aa->aa_oaps);
         list_splice(&aa->aa_oaps, &new_aa->aa_oaps);
-        INIT_LIST_HEAD(&aa->aa_oaps);
+        CFS_INIT_LIST_HEAD(&aa->aa_oaps);
 
         list_for_each_entry(oap, &new_aa->aa_oaps, oap_rpc_item) {
                 if (oap->oap_request) {
@@ -2062,9 +2062,9 @@ static struct ptlrpc_request *osc_build_req(struct client_obd *cli,
 
         CLASSERT(sizeof(*aa) <= sizeof(req->rq_async_args));
         aa = (struct osc_brw_async_args *)&req->rq_async_args;
-        INIT_LIST_HEAD(&aa->aa_oaps);
+        CFS_INIT_LIST_HEAD(&aa->aa_oaps);
         list_splice(rpc_list, &aa->aa_oaps);
-        INIT_LIST_HEAD(rpc_list);
+        CFS_INIT_LIST_HEAD(rpc_list);
 
 out:
         if (IS_ERR(req)) {
@@ -2492,7 +2492,7 @@ int osc_prep_async_page(struct obd_export *exp, struct lov_stripe_md *lsm,
         CFS_INIT_LIST_HEAD(&oap->oap_pending_item);
         CFS_INIT_LIST_HEAD(&oap->oap_urgent_item);
         CFS_INIT_LIST_HEAD(&oap->oap_rpc_item);
-        INIT_LIST_HEAD(&oap->oap_page_list);
+        CFS_INIT_LIST_HEAD(&oap->oap_page_list);
 
         oap->oap_occ.occ_interrupted = osc_occ_interrupted;
 
index c12c668..cd09f2b 100644 (file)
@@ -104,7 +104,7 @@ struct ptlrpc_connection *ptlrpc_get_connection(lnet_process_id_t peer,
         c->c_peer = peer;
         c->c_self = self;
        INIT_HLIST_NODE(&c->c_hash);
-       INIT_LIST_HEAD(&c->c_link);
+       CFS_INIT_LIST_HEAD(&c->c_link);
         if (uuid != NULL)
                 obd_str2uuid(&c->c_remote_uuid, uuid->uuid);
 
index 519e8d2..7e388ab 100644 (file)
@@ -709,7 +709,7 @@ static struct osc_quota_info *alloc_qinfo(struct client_obd *cli,
         if(!oqi)
                 RETURN(NULL);
 
-        INIT_LIST_HEAD(&oqi->oqi_hash);
+        CFS_INIT_LIST_HEAD(&oqi->oqi_hash);
         oqi->oqi_cli = cli;
         oqi->oqi_id = id;
         oqi->oqi_type = type;
@@ -824,7 +824,7 @@ int osc_quota_init(void)
                 RETURN(-ENOMEM);
 
         for (i = 0; i < NR_DQHASH; i++)
-                INIT_LIST_HEAD(qinfo_hash + i);
+                CFS_INIT_LIST_HEAD(qinfo_hash + i);
 
         RETURN(0);
 }
index dae233b..da9256d 100644 (file)
@@ -28,7 +28,7 @@ static struct it_node {
         int hit, valid;
 } *it_array;
 static int it_count;
-static struct list_head header = LIST_HEAD_INIT(header);
+CFS_LIST_HEAD(header);
 static unsigned long max_count = ULONG_MAX & ALIGN_MASK;
 static int have_wide_lock = 0;