Commit 9b857d26 authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

fs/hugetlbfs/inode.c: complete conversion to pr_foo()

Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 03afc0e2
...@@ -6,6 +6,8 @@ ...@@ -6,6 +6,8 @@
* Copyright (C) 2002 Linus Torvalds. * Copyright (C) 2002 Linus Torvalds.
*/ */
#define pr_fmt(fmt) KBUILD_MODNAME ": " fmt
#include <linux/module.h> #include <linux/module.h>
#include <linux/thread_info.h> #include <linux/thread_info.h>
#include <asm/current.h> #include <asm/current.h>
...@@ -823,8 +825,7 @@ hugetlbfs_parse_options(char *options, struct hugetlbfs_config *pconfig) ...@@ -823,8 +825,7 @@ hugetlbfs_parse_options(char *options, struct hugetlbfs_config *pconfig)
ps = memparse(args[0].from, &rest); ps = memparse(args[0].from, &rest);
pconfig->hstate = size_to_hstate(ps); pconfig->hstate = size_to_hstate(ps);
if (!pconfig->hstate) { if (!pconfig->hstate) {
printk(KERN_ERR pr_err("Unsupported page size %lu MB\n",
"hugetlbfs: Unsupported page size %lu MB\n",
ps >> 20); ps >> 20);
return -EINVAL; return -EINVAL;
} }
...@@ -832,8 +833,7 @@ hugetlbfs_parse_options(char *options, struct hugetlbfs_config *pconfig) ...@@ -832,8 +833,7 @@ hugetlbfs_parse_options(char *options, struct hugetlbfs_config *pconfig)
} }
default: default:
printk(KERN_ERR "hugetlbfs: Bad mount option: \"%s\"\n", pr_err("Bad mount option: \"%s\"\n", p);
p);
return -EINVAL; return -EINVAL;
break; break;
} }
...@@ -853,8 +853,7 @@ hugetlbfs_parse_options(char *options, struct hugetlbfs_config *pconfig) ...@@ -853,8 +853,7 @@ hugetlbfs_parse_options(char *options, struct hugetlbfs_config *pconfig)
return 0; return 0;
bad_val: bad_val:
printk(KERN_ERR "hugetlbfs: Bad value '%s' for mount option '%s'\n", pr_err("Bad value '%s' for mount option '%s'\n", args[0].from, p);
args[0].from, p);
return -EINVAL; return -EINVAL;
} }
...@@ -970,8 +969,7 @@ struct file *hugetlb_file_setup(const char *name, size_t size, ...@@ -970,8 +969,7 @@ struct file *hugetlb_file_setup(const char *name, size_t size,
*user = current_user(); *user = current_user();
if (user_shm_lock(size, *user)) { if (user_shm_lock(size, *user)) {
task_lock(current); task_lock(current);
printk_once(KERN_WARNING pr_warn_once("%s (%d): Using mlock ulimits for SHM_HUGETLB is deprecated\n",
"%s (%d): Using mlock ulimits for SHM_HUGETLB is deprecated\n",
current->comm, current->pid); current->comm, current->pid);
task_unlock(current); task_unlock(current);
} else { } else {
...@@ -1031,7 +1029,7 @@ static int __init init_hugetlbfs_fs(void) ...@@ -1031,7 +1029,7 @@ static int __init init_hugetlbfs_fs(void)
int i; int i;
if (!hugepages_supported()) { if (!hugepages_supported()) {
pr_info("hugetlbfs: disabling because there are no supported hugepage sizes\n"); pr_info("disabling because there are no supported hugepage sizes\n");
return -ENOTSUPP; return -ENOTSUPP;
} }
...@@ -1060,7 +1058,7 @@ static int __init init_hugetlbfs_fs(void) ...@@ -1060,7 +1058,7 @@ static int __init init_hugetlbfs_fs(void)
buf); buf);
if (IS_ERR(hugetlbfs_vfsmount[i])) { if (IS_ERR(hugetlbfs_vfsmount[i])) {
pr_err("hugetlb: Cannot mount internal hugetlbfs for " pr_err("Cannot mount internal hugetlbfs for "
"page size %uK", ps_kb); "page size %uK", ps_kb);
error = PTR_ERR(hugetlbfs_vfsmount[i]); error = PTR_ERR(hugetlbfs_vfsmount[i]);
hugetlbfs_vfsmount[i] = NULL; hugetlbfs_vfsmount[i] = NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment