Skip to content

Commit

Permalink
ext4: Use pr_warning_ratelimited() instead of printk_ratelimit()
Browse files Browse the repository at this point in the history
printk_ratelimit() is deprecated since it is a global instead of a
per-printk ratelimit.

Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
  • Loading branch information
Theodore Ts'o committed Dec 17, 2010
1 parent 225db7d commit a8901d3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/ext4/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
#include <linux/workqueue.h>
#include <linux/kernel.h>
#include <linux/slab.h>
#include <linux/ratelimit.h>

#include "ext4_jbd2.h"
#include "xattr.h"
Expand Down Expand Up @@ -3729,8 +3730,7 @@ static int ext4_set_bh_endio(struct buffer_head *bh, struct inode *inode)
retry:
io_end = ext4_init_io_end(inode, GFP_ATOMIC);
if (!io_end) {
if (printk_ratelimit())
printk(KERN_WARNING "%s: allocation fail\n", __func__);
pr_warning_ratelimited("%s: allocation fail\n", __func__);
schedule();
goto retry;
}
Expand Down

0 comments on commit a8901d3

Please sign in to comment.