Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54225
b: refs/heads/master
c: 824ebef
h: refs/heads/master
i:
  54223: e1334e0
v: v3
  • Loading branch information
Akinobu Mita authored and Linus Torvalds committed May 7, 2007
1 parent 78348a9 commit c279a69
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f0f3980b21508bd573eff1746d469436f50a903d
refs/heads/master: 824ebef122153a03925ae0ed211b4e8568d1c8db
11 changes: 7 additions & 4 deletions trunk/mm/slab.c
Original file line number Diff line number Diff line change
Expand Up @@ -3170,7 +3170,7 @@ static int __init failslab_debugfs(void)
struct dentry *dir;
int err;

err = init_fault_attr_dentries(&failslab.attr, "failslab");
err = init_fault_attr_dentries(&failslab.attr, "failslab");
if (err)
return err;
dir = failslab.attr.dentries.dir;
Expand Down Expand Up @@ -3208,9 +3208,6 @@ static inline void *____cache_alloc(struct kmem_cache *cachep, gfp_t flags)

check_irq_off();

if (should_failslab(cachep, flags))
return NULL;

ac = cpu_cache_get(cachep);
if (likely(ac->avail)) {
STATS_INC_ALLOCHIT(cachep);
Expand Down Expand Up @@ -3402,6 +3399,9 @@ __cache_alloc_node(struct kmem_cache *cachep, gfp_t flags, int nodeid,
unsigned long save_flags;
void *ptr;

if (should_failslab(cachep, flags))
return NULL;

cache_alloc_debugcheck_before(cachep, flags);
local_irq_save(save_flags);

Expand Down Expand Up @@ -3472,6 +3472,9 @@ __cache_alloc(struct kmem_cache *cachep, gfp_t flags, void *caller)
unsigned long save_flags;
void *objp;

if (should_failslab(cachep, flags))
return NULL;

cache_alloc_debugcheck_before(cachep, flags);
local_irq_save(save_flags);
objp = __do_cache_alloc(cachep, flags);
Expand Down

0 comments on commit c279a69

Please sign in to comment.