Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
5caf5c7d
Commit
5caf5c7d
authored
Jun 17, 2009
by
Pekka Enberg
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'slub/earlyboot' into for-linus
Conflicts: mm/slub.c
parents
e03ab9d4
964cf35c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
4 deletions
+14
-4
mm/slub.c
mm/slub.c
+14
-4
No files found.
mm/slub.c
View file @
5caf5c7d
...
...
@@ -2704,6 +2704,7 @@ static noinline struct kmem_cache *dma_kmalloc_cache(int index, gfp_t flags)
struct
kmem_cache
*
s
;
char
*
text
;
size_t
realsize
;
unsigned
long
slabflags
;
s
=
kmalloc_caches_dma
[
index
];
if
(
s
)
...
...
@@ -2725,10 +2726,18 @@ static noinline struct kmem_cache *dma_kmalloc_cache(int index, gfp_t flags)
(
unsigned
int
)
realsize
);
s
=
kmalloc
(
kmem_size
,
flags
&
~
SLUB_DMA
);
/*
* Must defer sysfs creation to a workqueue because we don't know
* what context we are called from. Before sysfs comes up, we don't
* need to do anything because our sysfs initcall will start by
* adding all existing slabs to sysfs.
*/
slabflags
=
SLAB_CACHE_DMA
|
SLAB_NOTRACK
;
if
(
slab_state
>=
SYSFS
)
slabflags
|=
__SYSFS_ADD_DEFERRED
;
if
(
!
s
||
!
text
||
!
kmem_cache_open
(
s
,
flags
,
text
,
realsize
,
ARCH_KMALLOC_MINALIGN
,
SLAB_CACHE_DMA
|
SLAB_NOTRACK
|
__SYSFS_ADD_DEFERRED
,
NULL
))
{
realsize
,
ARCH_KMALLOC_MINALIGN
,
slabflags
,
NULL
))
{
kfree
(
s
);
kfree
(
text
);
goto
unlock_out
;
...
...
@@ -2737,7 +2746,8 @@ static noinline struct kmem_cache *dma_kmalloc_cache(int index, gfp_t flags)
list_add
(
&
s
->
list
,
&
slab_caches
);
kmalloc_caches_dma
[
index
]
=
s
;
schedule_work
(
&
sysfs_add_work
);
if
(
slab_state
>=
SYSFS
)
schedule_work
(
&
sysfs_add_work
);
unlock_out:
up_write
(
&
slub_lock
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment