diff options
author | Dan Magenheimer <dan.magenheimer@oracle.com> | 2012-01-12 14:03:25 -0500 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2012-01-23 16:06:37 -0500 |
commit | 91c6cc9b5c216bd067f9af2cc64fcbe190755865 (patch) | |
tree | 83cbad6659c180ac8fbeca61382ac41ccbd7b382 | |
parent | 3167760f83899ccda312b9ad9306ec9e5dda06d4 (diff) |
mm: zcache/tmem/cleancache: s/flush/invalidate/
Complete the renaming from "flush" to "invalidate" across
both tmem frontends (cleancache and frontswap) and both tmem backends
(Xen and zcache), as required by akpm.
This change is completely cosmetic.
[v10: no change]
[v9: akpm@linux-foundation.org: change "flush" to "invalidate", part 3]
Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Cc: Kamezawa Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: Jan Beulich <JBeulich@novell.com>
Acked-by: Seth Jennings <sjenning@linux.vnet.ibm.com>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>
Cc: Hugh Dickins <hughd@google.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Nitin Gupta <ngupta@vflare.org>
Cc: Matthew Wilcox <matthew@wil.cx>
Cc: Chris Mason <chris.mason@oracle.com>
Cc: Rik Riel <riel@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
[v11: Remove the frontswap part]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
-rw-r--r-- | drivers/staging/zcache/zcache-main.c | 10 | ||||
-rw-r--r-- | drivers/xen/tmem.c | 10 | ||||
-rw-r--r-- | include/linux/cleancache.h | 11 | ||||
-rw-r--r-- | mm/cleancache.c | 7 |
4 files changed, 17 insertions, 21 deletions
diff --git a/drivers/staging/zcache/zcache-main.c b/drivers/staging/zcache/zcache-main.c index 56c1f9c80dc1..49c8791462f4 100644 --- a/drivers/staging/zcache/zcache-main.c +++ b/drivers/staging/zcache/zcache-main.c | |||
@@ -1758,9 +1758,9 @@ static int zcache_cleancache_init_shared_fs(char *uuid, size_t pagesize) | |||
1758 | static struct cleancache_ops zcache_cleancache_ops = { | 1758 | static struct cleancache_ops zcache_cleancache_ops = { |
1759 | .put_page = zcache_cleancache_put_page, | 1759 | .put_page = zcache_cleancache_put_page, |
1760 | .get_page = zcache_cleancache_get_page, | 1760 | .get_page = zcache_cleancache_get_page, |
1761 | .flush_page = zcache_cleancache_flush_page, | 1761 | .invalidate_page = zcache_cleancache_flush_page, |
1762 | .flush_inode = zcache_cleancache_flush_inode, | 1762 | .invalidate_inode = zcache_cleancache_flush_inode, |
1763 | .flush_fs = zcache_cleancache_flush_fs, | 1763 | .invalidate_fs = zcache_cleancache_flush_fs, |
1764 | .init_shared_fs = zcache_cleancache_init_shared_fs, | 1764 | .init_shared_fs = zcache_cleancache_init_shared_fs, |
1765 | .init_fs = zcache_cleancache_init_fs | 1765 | .init_fs = zcache_cleancache_init_fs |
1766 | }; | 1766 | }; |
@@ -1868,8 +1868,8 @@ static void zcache_frontswap_init(unsigned ignored) | |||
1868 | static struct frontswap_ops zcache_frontswap_ops = { | 1868 | static struct frontswap_ops zcache_frontswap_ops = { |
1869 | .put_page = zcache_frontswap_put_page, | 1869 | .put_page = zcache_frontswap_put_page, |
1870 | .get_page = zcache_frontswap_get_page, | 1870 | .get_page = zcache_frontswap_get_page, |
1871 | .flush_page = zcache_frontswap_flush_page, | 1871 | .invalidate_page = zcache_frontswap_flush_page, |
1872 | .flush_area = zcache_frontswap_flush_area, | 1872 | .invalidate_area = zcache_frontswap_flush_area, |
1873 | .init = zcache_frontswap_init | 1873 | .init = zcache_frontswap_init |
1874 | }; | 1874 | }; |
1875 | 1875 | ||
diff --git a/drivers/xen/tmem.c b/drivers/xen/tmem.c index d369965e8f8a..17d9e37beba4 100644 --- a/drivers/xen/tmem.c +++ b/drivers/xen/tmem.c | |||
@@ -242,9 +242,9 @@ __setup("nocleancache", no_cleancache); | |||
242 | static struct cleancache_ops tmem_cleancache_ops = { | 242 | static struct cleancache_ops tmem_cleancache_ops = { |
243 | .put_page = tmem_cleancache_put_page, | 243 | .put_page = tmem_cleancache_put_page, |
244 | .get_page = tmem_cleancache_get_page, | 244 | .get_page = tmem_cleancache_get_page, |
245 | .flush_page = tmem_cleancache_flush_page, | 245 | .invalidate_page = tmem_cleancache_flush_page, |
246 | .flush_inode = tmem_cleancache_flush_inode, | 246 | .invalidate_inode = tmem_cleancache_flush_inode, |
247 | .flush_fs = tmem_cleancache_flush_fs, | 247 | .invalidate_fs = tmem_cleancache_flush_fs, |
248 | .init_shared_fs = tmem_cleancache_init_shared_fs, | 248 | .init_shared_fs = tmem_cleancache_init_shared_fs, |
249 | .init_fs = tmem_cleancache_init_fs | 249 | .init_fs = tmem_cleancache_init_fs |
250 | }; | 250 | }; |
@@ -369,8 +369,8 @@ __setup("nofrontswap", no_frontswap); | |||
369 | static struct frontswap_ops tmem_frontswap_ops = { | 369 | static struct frontswap_ops tmem_frontswap_ops = { |
370 | .put_page = tmem_frontswap_put_page, | 370 | .put_page = tmem_frontswap_put_page, |
371 | .get_page = tmem_frontswap_get_page, | 371 | .get_page = tmem_frontswap_get_page, |
372 | .flush_page = tmem_frontswap_flush_page, | 372 | .invalidate_page = tmem_frontswap_flush_page, |
373 | .flush_area = tmem_frontswap_flush_area, | 373 | .invalidate_area = tmem_frontswap_flush_area, |
374 | .init = tmem_frontswap_init | 374 | .init = tmem_frontswap_init |
375 | }; | 375 | }; |
376 | #endif | 376 | #endif |
diff --git a/include/linux/cleancache.h b/include/linux/cleancache.h index 66fb63b243a8..42e55deee757 100644 --- a/include/linux/cleancache.h +++ b/include/linux/cleancache.h | |||
@@ -28,14 +28,9 @@ struct cleancache_ops { | |||
28 | pgoff_t, struct page *); | 28 | pgoff_t, struct page *); |
29 | void (*put_page)(int, struct cleancache_filekey, | 29 | void (*put_page)(int, struct cleancache_filekey, |
30 | pgoff_t, struct page *); | 30 | pgoff_t, struct page *); |
31 | /* | 31 | void (*invalidate_page)(int, struct cleancache_filekey, pgoff_t); |
32 | * NOTE: per akpm, flush_page, flush_inode and flush_fs will be | 32 | void (*invalidate_inode)(int, struct cleancache_filekey); |
33 | * renamed to invalidate_* in a later commit in which all | 33 | void (*invalidate_fs)(int); |
34 | * dependencies (i.e Xen, zcache) will be renamed simultaneously | ||
35 | */ | ||
36 | void (*flush_page)(int, struct cleancache_filekey, pgoff_t); | ||
37 | void (*flush_inode)(int, struct cleancache_filekey); | ||
38 | void (*flush_fs)(int); | ||
39 | }; | 34 | }; |
40 | 35 | ||
41 | extern struct cleancache_ops | 36 | extern struct cleancache_ops |
diff --git a/mm/cleancache.c b/mm/cleancache.c index 237c6e0feea0..b9c198bc6980 100644 --- a/mm/cleancache.c +++ b/mm/cleancache.c | |||
@@ -161,7 +161,8 @@ void __cleancache_invalidate_page(struct address_space *mapping, | |||
161 | if (pool_id >= 0) { | 161 | if (pool_id >= 0) { |
162 | VM_BUG_ON(!PageLocked(page)); | 162 | VM_BUG_ON(!PageLocked(page)); |
163 | if (cleancache_get_key(mapping->host, &key) >= 0) { | 163 | if (cleancache_get_key(mapping->host, &key) >= 0) { |
164 | (*cleancache_ops.flush_page)(pool_id, key, page->index); | 164 | (*cleancache_ops.invalidate_page)(pool_id, |
165 | key, page->index); | ||
165 | cleancache_flushes++; | 166 | cleancache_flushes++; |
166 | } | 167 | } |
167 | } | 168 | } |
@@ -179,7 +180,7 @@ void __cleancache_invalidate_inode(struct address_space *mapping) | |||
179 | struct cleancache_filekey key = { .u.key = { 0 } }; | 180 | struct cleancache_filekey key = { .u.key = { 0 } }; |
180 | 181 | ||
181 | if (pool_id >= 0 && cleancache_get_key(mapping->host, &key) >= 0) | 182 | if (pool_id >= 0 && cleancache_get_key(mapping->host, &key) >= 0) |
182 | (*cleancache_ops.flush_inode)(pool_id, key); | 183 | (*cleancache_ops.invalidate_inode)(pool_id, key); |
183 | } | 184 | } |
184 | EXPORT_SYMBOL(__cleancache_invalidate_inode); | 185 | EXPORT_SYMBOL(__cleancache_invalidate_inode); |
185 | 186 | ||
@@ -193,7 +194,7 @@ void __cleancache_invalidate_fs(struct super_block *sb) | |||
193 | if (sb->cleancache_poolid >= 0) { | 194 | if (sb->cleancache_poolid >= 0) { |
194 | int old_poolid = sb->cleancache_poolid; | 195 | int old_poolid = sb->cleancache_poolid; |
195 | sb->cleancache_poolid = -1; | 196 | sb->cleancache_poolid = -1; |
196 | (*cleancache_ops.flush_fs)(old_poolid); | 197 | (*cleancache_ops.invalidate_fs)(old_poolid); |
197 | } | 198 | } |
198 | } | 199 | } |
199 | EXPORT_SYMBOL(__cleancache_invalidate_fs); | 200 | EXPORT_SYMBOL(__cleancache_invalidate_fs); |