I agree Roland. <br>Only thing is it may save very few machine cycles :)<br><br>~subbu<br><br>--- fmr_pool.orig.c 2008-03-05 11:29:20.000000000 -0600<br>+++ fmr_pool.mod.c 2008-03-17 17:05:04.000000000 -0500<br>@@ -321,7 +321,9 @@<br>
fmr->pool = pool;<br> fmr->remap_count = 0;<br> fmr->ref_count = 0;<br>- INIT_HLIST_NODE(&fmr->cache_node);<br>+<br>+ if (params->cache)<br>+ INIT_HLIST_NODE(&fmr->cache_node);<br>
<br> fmr->fmr = ib_alloc_fmr(pd, params->access, &fmr_attr);<br> if (IS_ERR(fmr->fmr)) {<br><br><br><br><div class="gmail_quote">On Sun, Mar 9, 2008 at 3:51 PM, Roland Dreier <<a href="mailto:rdreier@cisco.com">rdreier@cisco.com</a>> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> > - INIT_HLIST_NODE(&fmr->cache_node);<br>
<div class="Ih2E3d"><br>
> + if (params->cache) {<br>
> + INIT_HLIST_NODE(&fmr->cache_node);<br>
> + }<br>
<br>
</div>I guess we could do that but in practice it doesn't make any<br>
difference, does it? Adding the if statement makes the code bigger<br>
(and it's not a fast path anyway).<br>
<br>
(BTW the kernel style is to leave out the { } around a single line block)<br>
<font color="#888888"><br>
- R.<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>. . . s u b b u<br>"You've got to be original, because if you're like someone else, what do they need you for?"