diff for duplicates of <20130201153217.GA27799@kroah.com> diff --git a/a/1.txt b/N1/1.txt index 89b7260..edf40b5 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -4,30 +4,30 @@ On Fri, Feb 01, 2013 at 11:04:36PM +0800, Feng Gao wrote: > I have a question. > > There are two duplicated lines now. -> dh->expires = now + msecs_to_jiffies(hinfo->cfg.expire); -> rateinfo_recalc(dh, now, hinfo->cfg.mode); +> � � � � � � � � � � � �dh->expires = now + msecs_to_jiffies(hinfo->cfg.expire); +> � � � � � � � � � � � �rateinfo_recalc(dh, now, hinfo->cfg.mode); > 1# case: The dsthash_find return a valid dh; > 2# case: There is a race. The race is true. > -> Why we could not adopt the method I sent before. +> Why we could not adopt the method I sent before.� > -> dh = dsthash_find(hinfo, &dst); -> if (dh == NULL) { -> dh = dsthash_alloc_init(hinfo, &dst, &new_node); -> if (dh == NULL) { -> rcu_read_unlock_bh(); -> goto hotdrop; -> } -> } +> � � dh = dsthash_find(hinfo, &dst); +> � � if (dh == NULL) { +> � � � � dh = dsthash_alloc_init(hinfo, &dst, &new_node); +> � � � � if (dh == NULL) { +> � � � � � � rcu_read_unlock_bh(); +> � � � � � � goto hotdrop; +> � � � � } +> � � } > -> if (new_node) { -> dh->expires = jiffies + msecs_to_jiffies(hinfo->cfg.expire); -> rateinfo_init(dh, hinfo); -> } else { -> /* update expiration timeout */ -> dh->expires = now + msecs_to_jiffies(hinfo->cfg.expire); -> rateinfo_recalc(dh, now, hinfo->cfg.mode); -> } +> � � if (new_node) { +> � � � � dh->expires = jiffies + msecs_to_jiffies(hinfo->cfg.expire); +> � � � � rateinfo_init(dh, hinfo); +> � � } else { +> � � � � /* update expiration timeout */ +> � � � � dh->expires = now + msecs_to_jiffies(hinfo->cfg.expire); +> � � � � rateinfo_recalc(dh, now, hinfo->cfg.mode); +> � � } > > I think it could avoid the two duplicated lines. diff --git a/a/content_digest b/N1/content_digest index fe0b091..75c41f2 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -16,30 +16,30 @@ "> I have a question.\n" "> \n" "> There are two duplicated lines now.\n" - "> \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240dh->expires = now + msecs_to_jiffies(hinfo->cfg.expire);\n" - "> \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 \302\240rateinfo_recalc(dh, now, hinfo->cfg.mode);\n" + "> \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275dh->expires = now + msecs_to_jiffies(hinfo->cfg.expire);\n" + "> \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275rateinfo_recalc(dh, now, hinfo->cfg.mode);\n" "> 1# case: The dsthash_find return a valid dh;\n" "> 2# case: There is a race. The race is true.\n" "> \n" - "> Why we could not adopt the method I sent before.\302\240\n" + "> Why we could not adopt the method I sent before.\303\257\302\277\302\275\n" "> \n" - "> \302\240 \302\240 dh = dsthash_find(hinfo, &dst);\n" - "> \302\240 \302\240 if (dh == NULL) {\n" - "> \302\240 \302\240 \302\240 \302\240 dh = dsthash_alloc_init(hinfo, &dst, &new_node);\n" - "> \302\240 \302\240 \302\240 \302\240 if (dh == NULL) {\n" - "> \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 rcu_read_unlock_bh();\n" - "> \302\240 \302\240 \302\240 \302\240 \302\240 \302\240 goto hotdrop;\n" - "> \302\240 \302\240 \302\240 \302\240 }\n" - "> \302\240 \302\240 }\n" + "> \303\257\302\277\302\275 \303\257\302\277\302\275 dh = dsthash_find(hinfo, &dst);\n" + "> \303\257\302\277\302\275 \303\257\302\277\302\275 if (dh == NULL) {\n" + "> \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 dh = dsthash_alloc_init(hinfo, &dst, &new_node);\n" + "> \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 if (dh == NULL) {\n" + "> \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 rcu_read_unlock_bh();\n" + "> \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 goto hotdrop;\n" + "> \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 }\n" + "> \303\257\302\277\302\275 \303\257\302\277\302\275 }\n" "> \n" - "> \302\240 \302\240 if (new_node) {\n" - "> \302\240 \302\240 \302\240 \302\240 dh->expires = jiffies + msecs_to_jiffies(hinfo->cfg.expire);\n" - "> \302\240 \302\240 \302\240 \302\240 rateinfo_init(dh, hinfo);\n" - "> \302\240 \302\240 } else {\n" - "> \302\240 \302\240 \302\240 \302\240 /* update expiration timeout */\n" - "> \302\240 \302\240 \302\240 \302\240 dh->expires = now + msecs_to_jiffies(hinfo->cfg.expire);\n" - "> \302\240 \302\240 \302\240 \302\240 rateinfo_recalc(dh, now, hinfo->cfg.mode);\n" - "> \302\240 \302\240 }\n" + "> \303\257\302\277\302\275 \303\257\302\277\302\275 if (new_node) {\n" + "> \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 dh->expires = jiffies + msecs_to_jiffies(hinfo->cfg.expire);\n" + "> \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 rateinfo_init(dh, hinfo);\n" + "> \303\257\302\277\302\275 \303\257\302\277\302\275 } else {\n" + "> \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 /* update expiration timeout */\n" + "> \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 dh->expires = now + msecs_to_jiffies(hinfo->cfg.expire);\n" + "> \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 \303\257\302\277\302\275 rateinfo_recalc(dh, now, hinfo->cfg.mode);\n" + "> \303\257\302\277\302\275 \303\257\302\277\302\275 }\n" "> \n" "> I think it could avoid the two duplicated lines.\n" "\n" @@ -52,4 +52,4 @@ "\n" greg k-h -8ae09b0dcf49107c55696be05296860cf9afc09ec1d2b5abf1b6e4920acb064f +bc611830dc2f5813c0b07d7c6198804947e36689fe55e5c04c5946d81900e93f
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.