aboutsummaryrefslogtreecommitdiffstats
path: root/mm/slab.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <m.chehab@samsung.com>2014-05-21 22:03:15 -0400
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-05-21 22:03:15 -0400
commite899966f626f1f657a4a7bac736c0b9ae5a243ea (patch)
treea4bb8362d871da67b41fee27bb85ad0bc83e0591 /mm/slab.c
parentba0d342ecc21fbbe2f6c178f4479944d1fb34f3b (diff)
parent4b660a7f5c8099d88d1a43d8ae138965112592c7 (diff)
Merge tag 'v3.15-rc6' into patchwork
Linux 3.15-rc6 * tag 'v3.15-rc6': (1314 commits) Linux 3.15-rc6 Btrfs: send, fix incorrect ref access when using extrefs Btrfs: fix EIO on reading file after ioctl clone works on it scripts/checksyscalls.sh: Make renameat optional asm-generic: Add renameat2 syscall ia64: add renameat2 syscall parisc: add renameat2 syscall m68k: add renameat2 syscall sysfs: make sure read buffer is zeroed ahci: imx: PLL clock needs 100us to settle down PCI: Wrong register used to check pending traffic target: fix memory leak on XCOPY random: fix BUG_ON caused by accounting simplification clk: tegra: Fix wrong value written to PLLE_AUX staging: rtl8723au: Do not reset wdev->iftype in netdev_close() ACPI / video: Revert native brightness quirk for ThinkPad T530 staging: rtl8723au: Use correct pipe type for USB interrupts crush: decode and initialize chooseleaf_vary_r libceph: fix corruption when using page_count 0 page in rbd arm64: fix pud_huge() for 2-level pagetables ...
Diffstat (limited to 'mm/slab.c')
-rw-r--r--mm/slab.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/slab.c b/mm/slab.c
index 388cb1ae6fbc..19d92181ce24 100644
--- a/mm/slab.c
+++ b/mm/slab.c
@@ -166,7 +166,7 @@ typedef unsigned char freelist_idx_t;
166typedef unsigned short freelist_idx_t; 166typedef unsigned short freelist_idx_t;
167#endif 167#endif
168 168
169#define SLAB_OBJ_MAX_NUM (1 << sizeof(freelist_idx_t) * BITS_PER_BYTE) 169#define SLAB_OBJ_MAX_NUM ((1 << sizeof(freelist_idx_t) * BITS_PER_BYTE) - 1)
170 170
171/* 171/*
172 * true if a page was allocated from pfmemalloc reserves for network-based 172 * true if a page was allocated from pfmemalloc reserves for network-based
@@ -2572,13 +2572,13 @@ static void *alloc_slabmgmt(struct kmem_cache *cachep,
2572 return freelist; 2572 return freelist;
2573} 2573}
2574 2574
2575static inline freelist_idx_t get_free_obj(struct page *page, unsigned char idx) 2575static inline freelist_idx_t get_free_obj(struct page *page, unsigned int idx)
2576{ 2576{
2577 return ((freelist_idx_t *)page->freelist)[idx]; 2577 return ((freelist_idx_t *)page->freelist)[idx];
2578} 2578}
2579 2579
2580static inline void set_free_obj(struct page *page, 2580static inline void set_free_obj(struct page *page,
2581 unsigned char idx, freelist_idx_t val) 2581 unsigned int idx, freelist_idx_t val)
2582{ 2582{
2583 ((freelist_idx_t *)(page->freelist))[idx] = val; 2583 ((freelist_idx_t *)(page->freelist))[idx] = val;
2584} 2584}