diff options
author | Vladimir Davydov <vdavydov@parallels.com> | 2015-04-14 18:46:42 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-04-14 19:49:03 -0400 |
commit | 9de1626290eaa7d921413ddc83544bc3bae27283 (patch) | |
tree | f027d2d717f7e52c5c16fd9ba65df6b82d5dbf6e | |
parent | 58be19dcf7c0c206e60796c2ee18fc4fc1659fea (diff) |
cleancache: zap uuid arg of cleancache_init_shared_fs
Use super_block->s_uuid instead. Every shared filesystem using cleancache
must now initialize super_block->s_uuid before calling
cleancache_init_shared_fs. The only one on the tree, ocfs2, already meets
this requirement.
Signed-off-by: Vladimir Davydov <vdavydov@parallels.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: David Vrabel <david.vrabel@citrix.com>
Cc: Mark Fasheh <mfasheh@suse.com>
Cc: Joel Becker <jlbec@evilplan.org>
Cc: Stefan Hengelein <ilendir@googlemail.com>
Cc: Florian Schmaus <fschmaus@gmail.com>
Cc: Andor Daam <andor.daam@googlemail.com>
Cc: Dan Magenheimer <dan.magenheimer@oracle.com>
Cc: Bob Liu <lliubbo@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r-- | fs/ocfs2/super.c | 2 | ||||
-rw-r--r-- | include/linux/cleancache.h | 6 | ||||
-rw-r--r-- | mm/cleancache.c | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c index a811a95cfd5f..837ddce4b659 100644 --- a/fs/ocfs2/super.c +++ b/fs/ocfs2/super.c | |||
@@ -2336,7 +2336,7 @@ static int ocfs2_initialize_super(struct super_block *sb, | |||
2336 | mlog_errno(status); | 2336 | mlog_errno(status); |
2337 | goto bail; | 2337 | goto bail; |
2338 | } | 2338 | } |
2339 | cleancache_init_shared_fs((char *)&di->id2.i_super.s_uuid, sb); | 2339 | cleancache_init_shared_fs(sb); |
2340 | 2340 | ||
2341 | bail: | 2341 | bail: |
2342 | return status; | 2342 | return status; |
diff --git a/include/linux/cleancache.h b/include/linux/cleancache.h index 4ce9056b31a8..29657d1c83fb 100644 --- a/include/linux/cleancache.h +++ b/include/linux/cleancache.h | |||
@@ -36,7 +36,7 @@ struct cleancache_ops { | |||
36 | extern struct cleancache_ops * | 36 | extern struct cleancache_ops * |
37 | cleancache_register_ops(struct cleancache_ops *ops); | 37 | cleancache_register_ops(struct cleancache_ops *ops); |
38 | extern void __cleancache_init_fs(struct super_block *); | 38 | extern void __cleancache_init_fs(struct super_block *); |
39 | extern void __cleancache_init_shared_fs(char *, struct super_block *); | 39 | extern void __cleancache_init_shared_fs(struct super_block *); |
40 | extern int __cleancache_get_page(struct page *); | 40 | extern int __cleancache_get_page(struct page *); |
41 | extern void __cleancache_put_page(struct page *); | 41 | extern void __cleancache_put_page(struct page *); |
42 | extern void __cleancache_invalidate_page(struct address_space *, struct page *); | 42 | extern void __cleancache_invalidate_page(struct address_space *, struct page *); |
@@ -78,10 +78,10 @@ static inline void cleancache_init_fs(struct super_block *sb) | |||
78 | __cleancache_init_fs(sb); | 78 | __cleancache_init_fs(sb); |
79 | } | 79 | } |
80 | 80 | ||
81 | static inline void cleancache_init_shared_fs(char *uuid, struct super_block *sb) | 81 | static inline void cleancache_init_shared_fs(struct super_block *sb) |
82 | { | 82 | { |
83 | if (cleancache_enabled) | 83 | if (cleancache_enabled) |
84 | __cleancache_init_shared_fs(uuid, sb); | 84 | __cleancache_init_shared_fs(sb); |
85 | } | 85 | } |
86 | 86 | ||
87 | static inline int cleancache_get_page(struct page *page) | 87 | static inline int cleancache_get_page(struct page *page) |
diff --git a/mm/cleancache.c b/mm/cleancache.c index 053bcd8f12fb..532495f2e4f4 100644 --- a/mm/cleancache.c +++ b/mm/cleancache.c | |||
@@ -155,7 +155,7 @@ void __cleancache_init_fs(struct super_block *sb) | |||
155 | EXPORT_SYMBOL(__cleancache_init_fs); | 155 | EXPORT_SYMBOL(__cleancache_init_fs); |
156 | 156 | ||
157 | /* Called by a cleancache-enabled clustered filesystem at time of mount */ | 157 | /* Called by a cleancache-enabled clustered filesystem at time of mount */ |
158 | void __cleancache_init_shared_fs(char *uuid, struct super_block *sb) | 158 | void __cleancache_init_shared_fs(struct super_block *sb) |
159 | { | 159 | { |
160 | int i; | 160 | int i; |
161 | 161 | ||
@@ -163,10 +163,10 @@ void __cleancache_init_shared_fs(char *uuid, struct super_block *sb) | |||
163 | for (i = 0; i < MAX_INITIALIZABLE_FS; i++) { | 163 | for (i = 0; i < MAX_INITIALIZABLE_FS; i++) { |
164 | if (shared_fs_poolid_map[i] == FS_UNKNOWN) { | 164 | if (shared_fs_poolid_map[i] == FS_UNKNOWN) { |
165 | sb->cleancache_poolid = i + FAKE_SHARED_FS_POOLID_OFFSET; | 165 | sb->cleancache_poolid = i + FAKE_SHARED_FS_POOLID_OFFSET; |
166 | uuids[i] = uuid; | 166 | uuids[i] = sb->s_uuid; |
167 | if (cleancache_ops) | 167 | if (cleancache_ops) |
168 | shared_fs_poolid_map[i] = cleancache_ops->init_shared_fs | 168 | shared_fs_poolid_map[i] = cleancache_ops->init_shared_fs |
169 | (uuid, PAGE_SIZE); | 169 | (sb->s_uuid, PAGE_SIZE); |
170 | else | 170 | else |
171 | shared_fs_poolid_map[i] = FS_NO_BACKEND; | 171 | shared_fs_poolid_map[i] = FS_NO_BACKEND; |
172 | break; | 172 | break; |