zram/xvmalloc: Close 32byte hole on 64bit CPUs
authorRobert Jennings <rcj@linux.vnet.ibm.com>
Fri, 28 Jan 2011 15:00:03 +0000 (09:00 -0600)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 4 Feb 2011 21:29:11 +0000 (13:29 -0800)
By swapping the total_pages statistic with the lock we close a
hole in the structure for 64-bit CPUs.

Signed-off-by: Robert Jennings <rcj@linux.vnet.ibm.com>
Reviewed-by: Pekka Enberg <penberg@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/zram/xvmalloc_int.h

index 82a31fb..b5f1f7f 100644 (file)
@@ -87,12 +87,9 @@ struct block_header {
 struct xv_pool {
        ulong flbitmap;
        ulong slbitmap[MAX_FLI];
-       spinlock_t lock;
-
+       u64 total_pages;        /* stats */
        struct freelist_entry freelist[NUM_FREE_LISTS];
-
-       /* stats */
-       u64 total_pages;
+       spinlock_t lock;
 };
 
 #endif