Skip to content

Commit

Permalink
zram/xvmalloc: Close 32byte hole on 64bit CPUs
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Robert Jennings authored and Greg Kroah-Hartman committed Feb 4, 2011
1 parent b1f5b81 commit 3770096
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions drivers/staging/zram/xvmalloc_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 3770096

Please sign in to comment.