diff for duplicates of <4C42A10B.2080904@gmail.com> diff --git a/a/1.txt b/N1/1.txt index 1660902..048d31a 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -3,7 +3,8 @@ >> + /* Count remaining entries */ >> + spin_lock(&mb_cache_spinlock); >> + list_for_each(l,&mb_cache_list) { ->> + struct mb_cache *cache >> + list_entry(l, struct mb_cache, c_cache_list); +>> + struct mb_cache *cache = +>> + list_entry(l, struct mb_cache, c_cache_list); > > This should be using list_for_each_entry. > @@ -28,20 +29,22 @@ index ec88ff3..5697d9e 100644 - spin_lock(&mb_cache_spinlock); - list_for_each(l, &mb_cache_list) { -- struct mb_cache *cache - list_entry(l, struct mb_cache, c_cache_list); +- struct mb_cache *cache = +- list_entry(l, struct mb_cache, c_cache_list); - mb_debug("cache %s (%d)", cache->c_name, - atomic_read(&cache->c_entry_count)); - count += atomic_read(&cache->c_entry_count); - } mb_debug("trying to free %d entries", nr_to_scan); -- if (nr_to_scan = 0) { +- if (nr_to_scan == 0) { - spin_unlock(&mb_cache_spinlock); -+ if (nr_to_scan = 0) ++ if (nr_to_scan == 0) goto out; - } + while (nr_to_scan-- && !list_empty(&mb_cache_lru_list)) { - struct mb_cache_entry *ce list_entry(mb_cache_lru_list.next, + struct mb_cache_entry *ce = + list_entry(mb_cache_lru_list.next, @@ -229,6 +221,14 @@ mb_cache_shrink_fn(int nr_to_scan, gfp_t gfp_mask) e_lru_list), gfp_mask); } @@ -65,3 +68,9 @@ index ec88ff3..5697d9e 100644 -- Thanks and Regards, shenghui + +-- +To unsubscribe, send a message with 'unsubscribe linux-mm' in +the body to majordomo@kvack.org. For more info on Linux MM, +see: http://www.linux-mm.org/ . +Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> diff --git a/a/content_digest b/N1/content_digest index c45b851..3422d77 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -2,8 +2,8 @@ "ref\04C427DC8.6020504@redhat.com\0" "ref\020100718060106.GA579@infradead.org\0" "From\0Wang Sheng-Hui <crosslonelyover@gmail.com>\0" - "Subject\0Re: [PATCH] fix return value for mb_cache_shrink_fn when nr_to_scan\0" - "Date\0Sun, 18 Jul 2010 06:36:59 +0000\0" + "Subject\0Re: [PATCH] fix return value for mb_cache_shrink_fn when nr_to_scan > 0\0" + "Date\0Sun, 18 Jul 2010 14:36:59 +0800\0" "To\0Christoph Hellwig <hch@infradead.org>\0" "Cc\0Eric Sandeen <sandeen@redhat.com>" linux-fsdevel@vger.kernel.org @@ -19,7 +19,8 @@ ">> +\t/* Count remaining entries */\n" ">> +\tspin_lock(&mb_cache_spinlock);\n" ">> +\tlist_for_each(l,&mb_cache_list) {\n" - ">> +\t\tstruct mb_cache *cache >> +\t\t\tlist_entry(l, struct mb_cache, c_cache_list);\n" + ">> +\t\tstruct mb_cache *cache =\n" + ">> +\t\t\tlist_entry(l, struct mb_cache, c_cache_list);\n" ">\n" "> This should be using list_for_each_entry.\n" ">\n" @@ -44,20 +45,22 @@ "\n" "-\tspin_lock(&mb_cache_spinlock);\n" "-\tlist_for_each(l, &mb_cache_list) {\n" - "-\t\tstruct mb_cache *cache -\t\t\tlist_entry(l, struct mb_cache, c_cache_list);\n" + "-\t\tstruct mb_cache *cache =\n" + "-\t\t\tlist_entry(l, struct mb_cache, c_cache_list);\n" "-\t\tmb_debug(\"cache %s (%d)\", cache->c_name,\n" "-\t\t\t atomic_read(&cache->c_entry_count));\n" "-\t\tcount += atomic_read(&cache->c_entry_count);\n" "-\t}\n" " \tmb_debug(\"trying to free %d entries\", nr_to_scan);\n" - "-\tif (nr_to_scan = 0) {\n" + "-\tif (nr_to_scan == 0) {\n" "-\t\tspin_unlock(&mb_cache_spinlock);\n" - "+\tif (nr_to_scan = 0)\n" + "+\tif (nr_to_scan == 0)\n" " \t\tgoto out;\n" "-\t}\n" "+\n" " \twhile (nr_to_scan-- && !list_empty(&mb_cache_lru_list)) {\n" - " \t\tstruct mb_cache_entry *ce \t\t\tlist_entry(mb_cache_lru_list.next,\n" + " \t\tstruct mb_cache_entry *ce =\n" + " \t\t\tlist_entry(mb_cache_lru_list.next,\n" "@@ -229,6 +221,14 @@ mb_cache_shrink_fn(int nr_to_scan, gfp_t gfp_mask)\n" " \t\t\t\t\t\t e_lru_list), gfp_mask);\n" " \t}\n" @@ -80,6 +83,12 @@ "\n" "-- \n" "Thanks and Regards,\n" - shenghui + "shenghui\n" + "\n" + "--\n" + "To unsubscribe, send a message with 'unsubscribe linux-mm' in\n" + "the body to majordomo@kvack.org. For more info on Linux MM,\n" + "see: http://www.linux-mm.org/ .\n" + "Don't email: <a href=mailto:\"dont@kvack.org\"> email@kvack.org </a>" -51d8c58eef835586838e622d2ed953a26f27ed276edf174a8d85d9c16ad47878 +b240c4a44703c37d088c43d298df5ebe24cb13c3391e26befeb8b9fe4bc72fcf
diff --git a/a/1.txt b/N2/1.txt index 1660902..947d6f9 100644 --- a/a/1.txt +++ b/N2/1.txt @@ -1,9 +1,10 @@ -于 2010-7-18 14:01, Christoph Hellwig 写道: +ao? 2010-7-18 14:01, Christoph Hellwig a??e??: > On Sat, Jul 17, 2010 at 11:06:32PM -0500, Eric Sandeen wrote: >> + /* Count remaining entries */ >> + spin_lock(&mb_cache_spinlock); >> + list_for_each(l,&mb_cache_list) { ->> + struct mb_cache *cache >> + list_entry(l, struct mb_cache, c_cache_list); +>> + struct mb_cache *cache = +>> + list_entry(l, struct mb_cache, c_cache_list); > > This should be using list_for_each_entry. > @@ -28,20 +29,22 @@ index ec88ff3..5697d9e 100644 - spin_lock(&mb_cache_spinlock); - list_for_each(l, &mb_cache_list) { -- struct mb_cache *cache - list_entry(l, struct mb_cache, c_cache_list); +- struct mb_cache *cache = +- list_entry(l, struct mb_cache, c_cache_list); - mb_debug("cache %s (%d)", cache->c_name, - atomic_read(&cache->c_entry_count)); - count += atomic_read(&cache->c_entry_count); - } mb_debug("trying to free %d entries", nr_to_scan); -- if (nr_to_scan = 0) { +- if (nr_to_scan == 0) { - spin_unlock(&mb_cache_spinlock); -+ if (nr_to_scan = 0) ++ if (nr_to_scan == 0) goto out; - } + while (nr_to_scan-- && !list_empty(&mb_cache_lru_list)) { - struct mb_cache_entry *ce list_entry(mb_cache_lru_list.next, + struct mb_cache_entry *ce = + list_entry(mb_cache_lru_list.next, @@ -229,6 +221,14 @@ mb_cache_shrink_fn(int nr_to_scan, gfp_t gfp_mask) e_lru_list), gfp_mask); } @@ -65,3 +68,9 @@ index ec88ff3..5697d9e 100644 -- Thanks and Regards, shenghui + +-- +To unsubscribe, send a message with 'unsubscribe linux-mm' in +the body to majordomo@kvack.org. For more info on Linux MM, +see: http://www.linux-mm.org/ . +Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a> diff --git a/a/content_digest b/N2/content_digest index c45b851..39e1581 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -2,8 +2,8 @@ "ref\04C427DC8.6020504@redhat.com\0" "ref\020100718060106.GA579@infradead.org\0" "From\0Wang Sheng-Hui <crosslonelyover@gmail.com>\0" - "Subject\0Re: [PATCH] fix return value for mb_cache_shrink_fn when nr_to_scan\0" - "Date\0Sun, 18 Jul 2010 06:36:59 +0000\0" + "Subject\0Re: [PATCH] fix return value for mb_cache_shrink_fn when nr_to_scan > 0\0" + "Date\0Sun, 18 Jul 2010 14:36:59 +0800\0" "To\0Christoph Hellwig <hch@infradead.org>\0" "Cc\0Eric Sandeen <sandeen@redhat.com>" linux-fsdevel@vger.kernel.org @@ -14,12 +14,13 @@ " a.gruenbacher@computer.org\0" "\00:1\0" "b\0" - "\344\272\216 2010-7-18 14:01, Christoph Hellwig \345\206\231\351\201\223:\n" + "ao? 2010-7-18 14:01, Christoph Hellwig a??e??:\n" "> On Sat, Jul 17, 2010 at 11:06:32PM -0500, Eric Sandeen wrote:\n" ">> +\t/* Count remaining entries */\n" ">> +\tspin_lock(&mb_cache_spinlock);\n" ">> +\tlist_for_each(l,&mb_cache_list) {\n" - ">> +\t\tstruct mb_cache *cache >> +\t\t\tlist_entry(l, struct mb_cache, c_cache_list);\n" + ">> +\t\tstruct mb_cache *cache =\n" + ">> +\t\t\tlist_entry(l, struct mb_cache, c_cache_list);\n" ">\n" "> This should be using list_for_each_entry.\n" ">\n" @@ -44,20 +45,22 @@ "\n" "-\tspin_lock(&mb_cache_spinlock);\n" "-\tlist_for_each(l, &mb_cache_list) {\n" - "-\t\tstruct mb_cache *cache -\t\t\tlist_entry(l, struct mb_cache, c_cache_list);\n" + "-\t\tstruct mb_cache *cache =\n" + "-\t\t\tlist_entry(l, struct mb_cache, c_cache_list);\n" "-\t\tmb_debug(\"cache %s (%d)\", cache->c_name,\n" "-\t\t\t atomic_read(&cache->c_entry_count));\n" "-\t\tcount += atomic_read(&cache->c_entry_count);\n" "-\t}\n" " \tmb_debug(\"trying to free %d entries\", nr_to_scan);\n" - "-\tif (nr_to_scan = 0) {\n" + "-\tif (nr_to_scan == 0) {\n" "-\t\tspin_unlock(&mb_cache_spinlock);\n" - "+\tif (nr_to_scan = 0)\n" + "+\tif (nr_to_scan == 0)\n" " \t\tgoto out;\n" "-\t}\n" "+\n" " \twhile (nr_to_scan-- && !list_empty(&mb_cache_lru_list)) {\n" - " \t\tstruct mb_cache_entry *ce \t\t\tlist_entry(mb_cache_lru_list.next,\n" + " \t\tstruct mb_cache_entry *ce =\n" + " \t\t\tlist_entry(mb_cache_lru_list.next,\n" "@@ -229,6 +221,14 @@ mb_cache_shrink_fn(int nr_to_scan, gfp_t gfp_mask)\n" " \t\t\t\t\t\t e_lru_list), gfp_mask);\n" " \t}\n" @@ -80,6 +83,12 @@ "\n" "-- \n" "Thanks and Regards,\n" - shenghui + "shenghui\n" + "\n" + "--\n" + "To unsubscribe, send a message with 'unsubscribe linux-mm' in\n" + "the body to majordomo@kvack.org. For more info on Linux MM,\n" + "see: http://www.linux-mm.org/ .\n" + "Don't email: <a href=mailto:\"dont@kvack.org\"> email@kvack.org </a>" -51d8c58eef835586838e622d2ed953a26f27ed276edf174a8d85d9c16ad47878 +0363f75f95ad88676238ec2fd88433a7ba2c9996b6760917b89448de5ddeae0f
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.