summaryrefslogtreecommitdiffstats
path: root/mm/slab_common.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2014-11-19 18:06:30 +0100
committerJ. Bruce Fields <bfields@redhat.com>2014-11-19 18:06:30 +0100
commit56429e9b3be567a173bd05f5594faf8522c34d3a (patch)
treed218d430ed992cdfa42da084bf36e5aa3c2ecb26 /mm/slab_common.c
parentnfsd: convert nfs4_file searches to use RCU (diff)
parentSUNRPC: Fix locking around callback channel reply receive (diff)
downloadlinux-56429e9b3be567a173bd05f5594faf8522c34d3a.tar.xz
linux-56429e9b3be567a173bd05f5594faf8522c34d3a.zip
merge nfs bugfixes into nfsd for-3.19 branch
In addition to nfsd bugfixes, there are some fixes in -rc5 for client bugs that can interfere with my testing.
Diffstat (limited to 'mm/slab_common.c')
-rw-r--r--mm/slab_common.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/mm/slab_common.c b/mm/slab_common.c
index 3a6e0cfdf03a..dcdab81bd240 100644
--- a/mm/slab_common.c
+++ b/mm/slab_common.c
@@ -93,16 +93,6 @@ static int kmem_cache_sanity_check(const char *name, size_t size)
s->object_size);
continue;
}
-
-#if !defined(CONFIG_SLUB)
- if (!strcmp(s->name, name)) {
- pr_err("%s (%s): Cache name already exists.\n",
- __func__, name);
- dump_stack();
- s = NULL;
- return -EINVAL;
- }
-#endif
}
WARN_ON(strchr(name, ' ')); /* It confuses parsers */
@@ -269,6 +259,10 @@ struct kmem_cache *find_mergeable(size_t size, size_t align,
if (s->size - size >= sizeof(void *))
continue;
+ if (IS_ENABLED(CONFIG_SLAB) && align &&
+ (align > s->align || s->align % align))
+ continue;
+
return s;
}
return NULL;