aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/linux/fs.h3
-rw-r--r--init/do_mounts.c7
2 files changed, 5 insertions, 5 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 8ef2fc9f1f08..b44b4ca82164 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2228,8 +2228,7 @@ extern void __init vfs_caches_init(unsigned long);
2228 2228
2229extern struct kmem_cache *names_cachep; 2229extern struct kmem_cache *names_cachep;
2230 2230
2231#define __getname_gfp(gfp) kmem_cache_alloc(names_cachep, (gfp)) 2231#define __getname() kmem_cache_alloc(names_cachep, GFP_KERNEL)
2232#define __getname() __getname_gfp(GFP_KERNEL)
2233#define __putname(name) kmem_cache_free(names_cachep, (void *)(name)) 2232#define __putname(name) kmem_cache_free(names_cachep, (void *)(name))
2234#ifndef CONFIG_AUDITSYSCALL 2233#ifndef CONFIG_AUDITSYSCALL
2235#define putname(name) __putname(name) 2234#define putname(name) __putname(name)
diff --git a/init/do_mounts.c b/init/do_mounts.c
index d3f0aeed2d39..f8a66424360d 100644
--- a/init/do_mounts.c
+++ b/init/do_mounts.c
@@ -353,8 +353,9 @@ static int __init do_mount_root(char *name, char *fs, int flags, void *data)
353 353
354void __init mount_block_root(char *name, int flags) 354void __init mount_block_root(char *name, int flags)
355{ 355{
356 char *fs_names = __getname_gfp(GFP_KERNEL 356 struct page *page = alloc_page(GFP_KERNEL |
357 | __GFP_NOTRACK_FALSE_POSITIVE); 357 __GFP_NOTRACK_FALSE_POSITIVE);
358 char *fs_names = page_address(page);
358 char *p; 359 char *p;
359#ifdef CONFIG_BLOCK 360#ifdef CONFIG_BLOCK
360 char b[BDEVNAME_SIZE]; 361 char b[BDEVNAME_SIZE];
@@ -406,7 +407,7 @@ retry:
406#endif 407#endif
407 panic("VFS: Unable to mount root fs on %s", b); 408 panic("VFS: Unable to mount root fs on %s", b);
408out: 409out:
409 putname(fs_names); 410 put_page(page);
410} 411}
411 412
412#ifdef CONFIG_ROOT_NFS 413#ifdef CONFIG_ROOT_NFS