ocfs2: send correct UUID to cleancache initialization
authorDan Magenheimer <dan.magenheimer@oracle.com>
Mon, 17 Oct 2011 23:47:17 +0000 (16:47 -0700)
committerJoel Becker <jlbec@evilplan.org>
Thu, 17 Nov 2011 09:46:48 +0000 (01:46 -0800)
ocfs2: Fix cleancache initialization call to correctly pass uuid

As reported by Steven Whitehouse in https://lkml.org/lkml/2011/5/27/221
the ocfs2 volume UUID is incorrectly passed to cleancache.
As a result, shared-ephemeral tmem pools will not actually
be created; instead they will be private (unshared) which
misses out on a major benefit of tmem.

Reported-by: Steven Whitehouse <swhiteho@redhat.com>
Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Joel Becker <jlbec@evilplan.org>
fs/ocfs2/super.c

index 938e2b2..4994f8b 100644 (file)
@@ -2360,7 +2360,7 @@ static int ocfs2_initialize_super(struct super_block *sb,
                mlog_errno(status);
                goto bail;
        }
-       cleancache_init_shared_fs((char *)&uuid_net_key, sb);
+       cleancache_init_shared_fs((char *)&di->id2.i_super.s_uuid, sb);
 
 bail:
        return status;