[ofa-general] ib_create_fmr_pool do INIT_HLIST_NODE only if cache is enabled

subbu kl subbukl at gmail.com
Thu Mar 6 12:09:19 PST 2008


In ib_create_fmr_pool() shouldn't we do INIT_HLIST_NODE only if cache is
enabled?


proposed patch -
-------------------------------------------------------------------------------------------------------------------------------
--- drivers/infiniband/core/fmr_pool.c  2008-02-20 09:38:14.000000000 -0600
+++ drivers/infiniband/core/fmr_pool.mod.c      2008-03-06 10:31:
44.000000000 -0600
@@ -321,7 +321,10 @@
                        fmr->pool             = pool;
                        fmr->remap_count      = 0;
                        fmr->ref_count        = 0;
-                       INIT_HLIST_NODE(&fmr->cache_node);
+
+                       if (params->cache) {
+                               INIT_HLIST_NODE(&fmr->cache_node);
+                       }

                        fmr->fmr = ib_alloc_fmr(pd, params->access,
&fmr_attr);
                        if (IS_ERR(fmr->fmr)) {


-- 
~s u b b u
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20080306/6f99c0db/attachment.html>


More information about the general mailing list