summaryrefslogtreecommitdiffstats
path: root/drivers/staging/zram
diff options
context:
space:
mode:
authorRobert Jennings <rcj@linux.vnet.ibm.com>2011-01-28 09:00:03 -0600
committerGreg Kroah-Hartman <gregkh@suse.de>2011-02-04 13:29:11 -0800
commit37700965858a099d250bca531ca1c99b22c8708d (patch)
tree8015f1cf7159a2db38cc0e9960fe395545a4dd6a /drivers/staging/zram
parentb1f5b81ebeee3974a8c793cafacace991d9a864d (diff)
downloadblackbird-op-linux-37700965858a099d250bca531ca1c99b22c8708d.tar.gz
blackbird-op-linux-37700965858a099d250bca531ca1c99b22c8708d.zip
zram/xvmalloc: Close 32byte hole on 64bit CPUs
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>
Diffstat (limited to 'drivers/staging/zram')
-rw-r--r--drivers/staging/zram/xvmalloc_int.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/staging/zram/xvmalloc_int.h b/drivers/staging/zram/xvmalloc_int.h
index 82a31fb99574..b5f1f7febcf6 100644
--- a/drivers/staging/zram/xvmalloc_int.h
+++ b/drivers/staging/zram/xvmalloc_int.h
@@ -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
OpenPOWER on IntegriCloud