diff options
author | James Morris <jmorris@namei.org> | 2009-05-22 04:40:59 -0400 |
---|---|---|
committer | James Morris <jmorris@namei.org> | 2009-05-22 04:40:59 -0400 |
commit | 2c9e703c618106f5383226fbb1f526cb11034f8a (patch) | |
tree | 87d7548001ea82f655fede0640466fc16aabcdf7 /mm/slub.c | |
parent | 6470c077cae12227318f40f3e6d756caadcce4b0 (diff) | |
parent | 5805977e63a36ad56594a623f3bd2bebcb7db233 (diff) |
Merge branch 'master' into next
Conflicts:
fs/exec.c
Removed IMA changes (the IMA checks are now performed via may_open()).
Signed-off-by: James Morris <jmorris@namei.org>
Diffstat (limited to 'mm/slub.c')
-rw-r--r-- | mm/slub.c | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -9,6 +9,7 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/mm.h> | 11 | #include <linux/mm.h> |
12 | #include <linux/swap.h> /* struct reclaim_state */ | ||
12 | #include <linux/module.h> | 13 | #include <linux/module.h> |
13 | #include <linux/bit_spinlock.h> | 14 | #include <linux/bit_spinlock.h> |
14 | #include <linux/interrupt.h> | 15 | #include <linux/interrupt.h> |
@@ -1170,6 +1171,8 @@ static void __free_slab(struct kmem_cache *s, struct page *page) | |||
1170 | 1171 | ||
1171 | __ClearPageSlab(page); | 1172 | __ClearPageSlab(page); |
1172 | reset_page_mapcount(page); | 1173 | reset_page_mapcount(page); |
1174 | if (current->reclaim_state) | ||
1175 | current->reclaim_state->reclaimed_slab += pages; | ||
1173 | __free_pages(page, order); | 1176 | __free_pages(page, order); |
1174 | } | 1177 | } |
1175 | 1178 | ||
@@ -1909,7 +1912,7 @@ static inline int calculate_order(int size) | |||
1909 | * Doh this slab cannot be placed using slub_max_order. | 1912 | * Doh this slab cannot be placed using slub_max_order. |
1910 | */ | 1913 | */ |
1911 | order = slab_order(size, 1, MAX_ORDER, 1); | 1914 | order = slab_order(size, 1, MAX_ORDER, 1); |
1912 | if (order <= MAX_ORDER) | 1915 | if (order < MAX_ORDER) |
1913 | return order; | 1916 | return order; |
1914 | return -ENOSYS; | 1917 | return -ENOSYS; |
1915 | } | 1918 | } |
@@ -2522,6 +2525,7 @@ __setup("slub_min_order=", setup_slub_min_order); | |||
2522 | static int __init setup_slub_max_order(char *str) | 2525 | static int __init setup_slub_max_order(char *str) |
2523 | { | 2526 | { |
2524 | get_option(&str, &slub_max_order); | 2527 | get_option(&str, &slub_max_order); |
2528 | slub_max_order = min(slub_max_order, MAX_ORDER - 1); | ||
2525 | 2529 | ||
2526 | return 1; | 2530 | return 1; |
2527 | } | 2531 | } |