diff options
author | Dan Magenheimer <dan.magenheimer@oracle.com> | 2011-09-21 11:56:28 -0400 |
---|---|---|
committer | Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> | 2012-01-23 16:06:24 -0500 |
commit | 3167760f83899ccda312b9ad9306ec9e5dda06d4 (patch) | |
tree | a040add1a9b267cb0fa92847c88526c1329a258b /mm/cleancache.c | |
parent | 972b2c719990f91eb3b2310d44ef8a2d38955a14 (diff) |
mm: cleancache: s/flush/invalidate/
Per akpm suggestions alter the use of the term flush to be
invalidate. The next patch will do this across all MM.
This change is completely cosmetic.
[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>
Reviewed-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>
[v10: Fixed fs: move code out of buffer.c conflict change]
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Diffstat (limited to 'mm/cleancache.c')
-rw-r--r-- | mm/cleancache.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/mm/cleancache.c b/mm/cleancache.c index bcaae4c2a770..237c6e0feea0 100644 --- a/mm/cleancache.c +++ b/mm/cleancache.c | |||
@@ -19,7 +19,7 @@ | |||
19 | 19 | ||
20 | /* | 20 | /* |
21 | * This global enablement flag may be read thousands of times per second | 21 | * This global enablement flag may be read thousands of times per second |
22 | * by cleancache_get/put/flush even on systems where cleancache_ops | 22 | * by cleancache_get/put/invalidate even on systems where cleancache_ops |
23 | * is not claimed (e.g. cleancache is config'ed on but remains | 23 | * is not claimed (e.g. cleancache is config'ed on but remains |
24 | * disabled), so is preferred to the slower alternative: a function | 24 | * disabled), so is preferred to the slower alternative: a function |
25 | * call that checks a non-global. | 25 | * call that checks a non-global. |
@@ -148,10 +148,11 @@ void __cleancache_put_page(struct page *page) | |||
148 | EXPORT_SYMBOL(__cleancache_put_page); | 148 | EXPORT_SYMBOL(__cleancache_put_page); |
149 | 149 | ||
150 | /* | 150 | /* |
151 | * Flush any data from cleancache associated with the poolid and the | 151 | * Invalidate any data from cleancache associated with the poolid and the |
152 | * page's inode and page index so that a subsequent "get" will fail. | 152 | * page's inode and page index so that a subsequent "get" will fail. |
153 | */ | 153 | */ |
154 | void __cleancache_flush_page(struct address_space *mapping, struct page *page) | 154 | void __cleancache_invalidate_page(struct address_space *mapping, |
155 | struct page *page) | ||
155 | { | 156 | { |
156 | /* careful... page->mapping is NULL sometimes when this is called */ | 157 | /* careful... page->mapping is NULL sometimes when this is called */ |
157 | int pool_id = mapping->host->i_sb->cleancache_poolid; | 158 | int pool_id = mapping->host->i_sb->cleancache_poolid; |
@@ -165,14 +166,14 @@ void __cleancache_flush_page(struct address_space *mapping, struct page *page) | |||
165 | } | 166 | } |
166 | } | 167 | } |
167 | } | 168 | } |
168 | EXPORT_SYMBOL(__cleancache_flush_page); | 169 | EXPORT_SYMBOL(__cleancache_invalidate_page); |
169 | 170 | ||
170 | /* | 171 | /* |
171 | * Flush all data from cleancache associated with the poolid and the | 172 | * Invalidate all data from cleancache associated with the poolid and the |
172 | * mappings's inode so that all subsequent gets to this poolid/inode | 173 | * mappings's inode so that all subsequent gets to this poolid/inode |
173 | * will fail. | 174 | * will fail. |
174 | */ | 175 | */ |
175 | void __cleancache_flush_inode(struct address_space *mapping) | 176 | void __cleancache_invalidate_inode(struct address_space *mapping) |
176 | { | 177 | { |
177 | int pool_id = mapping->host->i_sb->cleancache_poolid; | 178 | int pool_id = mapping->host->i_sb->cleancache_poolid; |
178 | struct cleancache_filekey key = { .u.key = { 0 } }; | 179 | struct cleancache_filekey key = { .u.key = { 0 } }; |
@@ -180,14 +181,14 @@ void __cleancache_flush_inode(struct address_space *mapping) | |||
180 | if (pool_id >= 0 && cleancache_get_key(mapping->host, &key) >= 0) | 181 | if (pool_id >= 0 && cleancache_get_key(mapping->host, &key) >= 0) |
181 | (*cleancache_ops.flush_inode)(pool_id, key); | 182 | (*cleancache_ops.flush_inode)(pool_id, key); |
182 | } | 183 | } |
183 | EXPORT_SYMBOL(__cleancache_flush_inode); | 184 | EXPORT_SYMBOL(__cleancache_invalidate_inode); |
184 | 185 | ||
185 | /* | 186 | /* |
186 | * Called by any cleancache-enabled filesystem at time of unmount; | 187 | * Called by any cleancache-enabled filesystem at time of unmount; |
187 | * note that pool_id is surrendered and may be reutrned by a subsequent | 188 | * note that pool_id is surrendered and may be reutrned by a subsequent |
188 | * cleancache_init_fs or cleancache_init_shared_fs | 189 | * cleancache_init_fs or cleancache_init_shared_fs |
189 | */ | 190 | */ |
190 | void __cleancache_flush_fs(struct super_block *sb) | 191 | void __cleancache_invalidate_fs(struct super_block *sb) |
191 | { | 192 | { |
192 | if (sb->cleancache_poolid >= 0) { | 193 | if (sb->cleancache_poolid >= 0) { |
193 | int old_poolid = sb->cleancache_poolid; | 194 | int old_poolid = sb->cleancache_poolid; |
@@ -195,7 +196,7 @@ void __cleancache_flush_fs(struct super_block *sb) | |||
195 | (*cleancache_ops.flush_fs)(old_poolid); | 196 | (*cleancache_ops.flush_fs)(old_poolid); |
196 | } | 197 | } |
197 | } | 198 | } |
198 | EXPORT_SYMBOL(__cleancache_flush_fs); | 199 | EXPORT_SYMBOL(__cleancache_invalidate_fs); |
199 | 200 | ||
200 | #ifdef CONFIG_SYSFS | 201 | #ifdef CONFIG_SYSFS |
201 | 202 | ||