cleancache: zap uuid arg of cleancache_init_shared_fs
authorVladimir Davydov <vdavydov@parallels.com>
Tue, 14 Apr 2015 22:46:42 +0000 (15:46 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 14 Apr 2015 23:49:03 +0000 (16:49 -0700)
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>
fs/ocfs2/super.c
include/linux/cleancache.h
mm/cleancache.c

index a811a95cfd5f92ea81ce02d0663b361e99fae54f..837ddce4b659fa99816114b07749081872967c8a 100644 (file)
@@ -2336,7 +2336,7 @@ static int ocfs2_initialize_super(struct super_block *sb,
                mlog_errno(status);
                goto bail;
        }
-       cleancache_init_shared_fs((char *)&di->id2.i_super.s_uuid, sb);
+       cleancache_init_shared_fs(sb);
 
 bail:
        return status;
index 4ce9056b31a8d96f5d8b2696555eea2dbffd45a3..29657d1c83fb8bdb9c626772d97e974e7887447a 100644 (file)
@@ -36,7 +36,7 @@ struct cleancache_ops {
 extern struct cleancache_ops *
        cleancache_register_ops(struct cleancache_ops *ops);
 extern void __cleancache_init_fs(struct super_block *);
-extern void __cleancache_init_shared_fs(char *, struct super_block *);
+extern void __cleancache_init_shared_fs(struct super_block *);
 extern int  __cleancache_get_page(struct page *);
 extern void __cleancache_put_page(struct page *);
 extern void __cleancache_invalidate_page(struct address_space *, struct page *);
@@ -78,10 +78,10 @@ static inline void cleancache_init_fs(struct super_block *sb)
                __cleancache_init_fs(sb);
 }
 
-static inline void cleancache_init_shared_fs(char *uuid, struct super_block *sb)
+static inline void cleancache_init_shared_fs(struct super_block *sb)
 {
        if (cleancache_enabled)
-               __cleancache_init_shared_fs(uuid, sb);
+               __cleancache_init_shared_fs(sb);
 }
 
 static inline int cleancache_get_page(struct page *page)
index 053bcd8f12fb352d847b555dd51ef49032543bc5..532495f2e4f402f4261a60d03149c9b91451ba0d 100644 (file)
@@ -155,7 +155,7 @@ void __cleancache_init_fs(struct super_block *sb)
 EXPORT_SYMBOL(__cleancache_init_fs);
 
 /* Called by a cleancache-enabled clustered filesystem at time of mount */
-void __cleancache_init_shared_fs(char *uuid, struct super_block *sb)
+void __cleancache_init_shared_fs(struct super_block *sb)
 {
        int i;
 
@@ -163,10 +163,10 @@ void __cleancache_init_shared_fs(char *uuid, struct super_block *sb)
        for (i = 0; i < MAX_INITIALIZABLE_FS; i++) {
                if (shared_fs_poolid_map[i] == FS_UNKNOWN) {
                        sb->cleancache_poolid = i + FAKE_SHARED_FS_POOLID_OFFSET;
-                       uuids[i] = uuid;
+                       uuids[i] = sb->s_uuid;
                        if (cleancache_ops)
                                shared_fs_poolid_map[i] = cleancache_ops->init_shared_fs
-                                               (uuid, PAGE_SIZE);
+                                               (sb->s_uuid, PAGE_SIZE);
                        else
                                shared_fs_poolid_map[i] = FS_NO_BACKEND;
                        break;