Commit 93e7ea8c authored by Konrad Malkowski's avatar Konrad Malkowski Committed by Greg Kroah-Hartman

staging: lustre: Replace printk_ratelimited with pr_warn_ratelimited

This patch fixes the checkpoint.pl warning:

WARNING: Prefer printk_ratelimited or pr_<level>_ratelimited to
printk_ratelimit
Signed-off-by: default avatarKonrad Malkowski <konrad.malkowski@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 57d14635
...@@ -191,10 +191,9 @@ cfs_trace_get_tage_try(struct cfs_trace_cpu_data *tcd, unsigned long len) ...@@ -191,10 +191,9 @@ cfs_trace_get_tage_try(struct cfs_trace_cpu_data *tcd, unsigned long len)
} else { } else {
tage = cfs_tage_alloc(GFP_ATOMIC); tage = cfs_tage_alloc(GFP_ATOMIC);
if (unlikely(!tage)) { if (unlikely(!tage)) {
if ((!memory_pressure_get() || if (!memory_pressure_get() || in_interrupt())
in_interrupt()) && printk_ratelimit()) pr_warn_ratelimited("cannot allocate a tage (%ld)\n",
pr_warn("cannot allocate a tage (%ld)\n", tcd->tcd_cur_pages);
tcd->tcd_cur_pages);
return NULL; return NULL;
} }
} }
...@@ -229,9 +228,8 @@ static void cfs_tcd_shrink(struct cfs_trace_cpu_data *tcd) ...@@ -229,9 +228,8 @@ static void cfs_tcd_shrink(struct cfs_trace_cpu_data *tcd)
* from here: this will lead to infinite recursion. * from here: this will lead to infinite recursion.
*/ */
if (printk_ratelimit()) pr_warn_ratelimited("debug daemon buffer overflowed; discarding 10%% of pages (%d of %ld)\n",
pr_warn("debug daemon buffer overflowed; discarding 10%% of pages (%d of %ld)\n", pgcount + 1, tcd->tcd_cur_pages);
pgcount + 1, tcd->tcd_cur_pages);
INIT_LIST_HEAD(&pc.pc_pages); INIT_LIST_HEAD(&pc.pc_pages);
......
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