提交 37700965 编写于 作者: R Robert Jennings 提交者: Greg Kroah-Hartman

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: NRobert Jennings <rcj@linux.vnet.ibm.com>
Reviewed-by: NPekka Enberg <penberg@kernel.org>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 b1f5b81e
...@@ -87,12 +87,9 @@ struct block_header { ...@@ -87,12 +87,9 @@ struct block_header {
struct xv_pool { struct xv_pool {
ulong flbitmap; ulong flbitmap;
ulong slbitmap[MAX_FLI]; ulong slbitmap[MAX_FLI];
spinlock_t lock; u64 total_pages; /* stats */
struct freelist_entry freelist[NUM_FREE_LISTS]; struct freelist_entry freelist[NUM_FREE_LISTS];
spinlock_t lock;
/* stats */
u64 total_pages;
}; };
#endif #endif
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册