Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 60739
b: refs/heads/master
c: dfce864
h: refs/heads/master
i:
  60737: 3fc8425
  60735: ed90eb4
v: v3
  • Loading branch information
Christoph Lameter authored and Linus Torvalds committed Jul 17, 2007
1 parent cb690df commit 25a782e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 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: 2e443fd003d76394a8ceb78f079260478aa10710
refs/heads/master: dfce8648d64c07eade40d456d59cb4bfcbba008c
11 changes: 9 additions & 2 deletions trunk/mm/slub.c
Original file line number Diff line number Diff line change
Expand Up @@ -2301,8 +2301,15 @@ static noinline struct kmem_cache *dma_kmalloc_cache(int index, gfp_t flags)
text = kasprintf(flags & ~SLUB_DMA, "kmalloc_dma-%d",
(unsigned int)realsize);
s = create_kmalloc_cache(x, text, realsize, flags);
kmalloc_caches_dma[index] = s;
return s;
down_write(&slub_lock);
if (!kmalloc_caches_dma[index]) {
kmalloc_caches_dma[index] = s;
up_write(&slub_lock);
return s;
}
up_write(&slub_lock);
kmem_cache_destroy(s);
return kmalloc_caches_dma[index];
}
#endif

Expand Down

0 comments on commit 25a782e

Please sign in to comment.