Dquot slab cache: Fix competing alignments There is a competing specification of a hardware alignment and hardware cache alignment. Remove the cache alignments. Convert call to use a macro and specify cache line alignment on the struct. Signed-off-by: Christoph Lameter Index: slub/fs/dquot.c =================================================================== --- slub.orig/fs/dquot.c 2007-05-04 21:56:20.000000000 -0700 +++ slub/fs/dquot.c 2007-05-04 22:17:50.000000000 -0700 @@ -1848,11 +1848,8 @@ static int __init dquot_init(void) register_sysctl_table(sys_table); - dquot_cachep = kmem_cache_create("dquot", - sizeof(struct dquot), sizeof(unsigned long) * 4, - (SLAB_HWCACHE_ALIGN|SLAB_RECLAIM_ACCOUNT| - SLAB_MEM_SPREAD|SLAB_PANIC), - NULL, NULL); + dquot_cachep = KMEM_CACHE(dquot, + SLAB_MEM_SPREAD|SLAB_RECLAIM_ACCOUNT|SLAB_PANIC); order = 0; dquot_hash = (struct hlist_head *)__get_free_pages(GFP_ATOMIC, order); Index: slub/include/linux/quota.h =================================================================== --- slub.orig/include/linux/quota.h 2007-05-04 22:06:09.000000000 -0700 +++ slub/include/linux/quota.h 2007-05-04 22:06:54.000000000 -0700 @@ -225,7 +225,7 @@ struct dquot { unsigned long dq_flags; /* See DQ_* */ short dq_type; /* Type of quota */ struct mem_dqblk dq_dqb; /* Diskquota usage */ -}; +} ____cacheline_aligned; #define NODQUOT (struct dquot *)NULL