diff for duplicates of <4C427DC8.6020504@redhat.com> diff --git a/a/1.txt b/N1/1.txt index 8fb4da5..6ce0862 100644 --- a/a/1.txt +++ b/N1/1.txt @@ -35,21 +35,23 @@ index ec88ff3..3af79de 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; - } + + spin_lock &mb_cache_spinlock); 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,17 @@ mb_cache_shrink_fn(int nr_to_scan, gfp_t gfp_mask) e_lru_list), gfp_mask); } @@ -57,7 +59,8 @@ index ec88ff3..3af79de 100644 + /* 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); + mb_debug("cache %s (%d)", cache->c_name, + atomic_read(&cache->c_entry_count)); + count += atomic_read(&cache->c_entry_count); diff --git a/a/content_digest b/N1/content_digest index b74971a..d7942ea 100644 --- a/a/content_digest +++ b/N1/content_digest @@ -1,7 +1,7 @@ "ref\04C425273.5000702@gmail.com\0" "From\0Eric Sandeen <sandeen@redhat.com>\0" - "Subject\0Re: [PATCH] fix return value for mb_cache_shrink_fn when nr_to_scan\0" - "Date\0Sun, 18 Jul 2010 04:06:32 +0000\0" + "Subject\0Re: [PATCH] fix return value for mb_cache_shrink_fn when nr_to_scan > 0\0" + "Date\0Sat, 17 Jul 2010 23:06:32 -0500\0" "To\0Wang Sheng-Hui <crosslonelyover@gmail.com>\0" "Cc\0linux-fsdevel@vger.kernel.org" viro@zeniv.linux.org.uk @@ -48,21 +48,23 @@ " \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" "+\tspin_lock &mb_cache_spinlock);\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,17 @@ 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" @@ -70,7 +72,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" "+\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" @@ -80,4 +83,4 @@ " \treturn (count / 100) * sysctl_vfs_cache_pressure;\n" } -3f46917d40a270a6becd8a92596a7bea41e00bdc25740ad111aad71b958f6433 +e81194bc8e579b0cf0f493281244e84aa42973abe84c26b6ead2c8f70fff4963
diff --git a/a/1.txt b/N2/1.txt index 8fb4da5..a0efe9b 100644 --- a/a/1.txt +++ b/N2/1.txt @@ -35,21 +35,23 @@ index ec88ff3..3af79de 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; - } + + spin_lock &mb_cache_spinlock); 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,17 @@ mb_cache_shrink_fn(int nr_to_scan, gfp_t gfp_mask) e_lru_list), gfp_mask); } @@ -57,7 +59,8 @@ index ec88ff3..3af79de 100644 + /* 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); + mb_debug("cache %s (%d)", cache->c_name, + atomic_read(&cache->c_entry_count)); + count += atomic_read(&cache->c_entry_count); @@ -66,3 +69,10 @@ index ec88ff3..3af79de 100644 + return (count / 100) * sysctl_vfs_cache_pressure; } + + +-- +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 b74971a..0177ac7 100644 --- a/a/content_digest +++ b/N2/content_digest @@ -1,7 +1,7 @@ "ref\04C425273.5000702@gmail.com\0" "From\0Eric Sandeen <sandeen@redhat.com>\0" - "Subject\0Re: [PATCH] fix return value for mb_cache_shrink_fn when nr_to_scan\0" - "Date\0Sun, 18 Jul 2010 04:06:32 +0000\0" + "Subject\0Re: [PATCH] fix return value for mb_cache_shrink_fn when nr_to_scan > 0\0" + "Date\0Sat, 17 Jul 2010 23:06:32 -0500\0" "To\0Wang Sheng-Hui <crosslonelyover@gmail.com>\0" "Cc\0linux-fsdevel@vger.kernel.org" viro@zeniv.linux.org.uk @@ -48,21 +48,23 @@ " \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" "+\tspin_lock &mb_cache_spinlock);\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,17 @@ 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" @@ -70,7 +72,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" "+\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" @@ -78,6 +81,13 @@ "+\tspin_unlock(&mb_cache_spinlock);\n" "+\n" " \treturn (count / 100) * sysctl_vfs_cache_pressure;\n" - } + " }\n" + " \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>" -3f46917d40a270a6becd8a92596a7bea41e00bdc25740ad111aad71b958f6433 +742c617a8d09e9cec86868befa58c7a4125e6ac3f6fa92ba9d7cd9bb9a8a0342
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.