Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Vladimir Davydov and committed by
Linus Torvalds
9de16262 58be19dc

+7 -7
+1 -1
fs/ocfs2/super.c
··· 2336 2336 mlog_errno(status); 2337 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 2341 bail: 2342 2342 return status;
+3 -3
include/linux/cleancache.h
··· 36 36 extern struct cleancache_ops * 37 37 cleancache_register_ops(struct cleancache_ops *ops); 38 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 40 extern int __cleancache_get_page(struct page *); 41 41 extern void __cleancache_put_page(struct page *); 42 42 extern void __cleancache_invalidate_page(struct address_space *, struct page *); ··· 78 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 83 if (cleancache_enabled) 84 - __cleancache_init_shared_fs(uuid, sb); 84 + __cleancache_init_shared_fs(sb); 85 85 } 86 86 87 87 static inline int cleancache_get_page(struct page *page)
+3 -3
mm/cleancache.c
··· 155 155 EXPORT_SYMBOL(__cleancache_init_fs); 156 156 157 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 160 int i; 161 161 ··· 163 163 for (i = 0; i < MAX_INITIALIZABLE_FS; i++) { 164 164 if (shared_fs_poolid_map[i] == FS_UNKNOWN) { 165 165 sb->cleancache_poolid = i + FAKE_SHARED_FS_POOLID_OFFSET; 166 - uuids[i] = uuid; 166 + uuids[i] = sb->s_uuid; 167 167 if (cleancache_ops) 168 168 shared_fs_poolid_map[i] = cleancache_ops->init_shared_fs 169 - (uuid, PAGE_SIZE); 169 + (sb->s_uuid, PAGE_SIZE); 170 170 else 171 171 shared_fs_poolid_map[i] = FS_NO_BACKEND; 172 172 break;