diff options
author | David Sterba <dsterba@suse.cz> | 2011-05-06 09:33:15 -0400 |
---|---|---|
committer | David Sterba <dsterba@suse.cz> | 2011-05-12 12:08:38 -0400 |
commit | 7a36ddec1003a4e84e79f28ee714a142ed6bc529 (patch) | |
tree | a3418ebd771d4c0f25b07c281158548640cd1f7c /fs/btrfs/inode.c | |
parent | 182608c8294b5fe90d7bbd4b026c82bf0a24b736 (diff) |
btrfs: use printk_ratelimited instead of printk_ratelimit
As per printk_ratelimit comment, it should not be used.
Signed-off-by: David Sterba <dsterba@suse.cz>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r-- | fs/btrfs/inode.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 5ff52b644a60..1d1017f91558 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c | |||
@@ -37,6 +37,7 @@ | |||
37 | #include <linux/posix_acl.h> | 37 | #include <linux/posix_acl.h> |
38 | #include <linux/falloc.h> | 38 | #include <linux/falloc.h> |
39 | #include <linux/slab.h> | 39 | #include <linux/slab.h> |
40 | #include <linux/ratelimit.h> | ||
40 | #include "compat.h" | 41 | #include "compat.h" |
41 | #include "ctree.h" | 42 | #include "ctree.h" |
42 | #include "disk-io.h" | 43 | #include "disk-io.h" |
@@ -2004,12 +2005,10 @@ good: | |||
2004 | return 0; | 2005 | return 0; |
2005 | 2006 | ||
2006 | zeroit: | 2007 | zeroit: |
2007 | if (printk_ratelimit()) { | 2008 | printk_ratelimited(KERN_INFO "btrfs csum failed ino %lu off %llu csum %u " |
2008 | printk(KERN_INFO "btrfs csum failed ino %lu off %llu csum %u " | ||
2009 | "private %llu\n", page->mapping->host->i_ino, | 2009 | "private %llu\n", page->mapping->host->i_ino, |
2010 | (unsigned long long)start, csum, | 2010 | (unsigned long long)start, csum, |
2011 | (unsigned long long)private); | 2011 | (unsigned long long)private); |
2012 | } | ||
2013 | memset(kaddr + offset, 1, end - start + 1); | 2012 | memset(kaddr + offset, 1, end - start + 1); |
2014 | flush_dcache_page(page); | 2013 | flush_dcache_page(page); |
2015 | kunmap_atomic(kaddr, KM_USER0); | 2014 | kunmap_atomic(kaddr, KM_USER0); |
@@ -4243,22 +4242,18 @@ void btrfs_dirty_inode(struct inode *inode) | |||
4243 | btrfs_end_transaction(trans, root); | 4242 | btrfs_end_transaction(trans, root); |
4244 | trans = btrfs_start_transaction(root, 1); | 4243 | trans = btrfs_start_transaction(root, 1); |
4245 | if (IS_ERR(trans)) { | 4244 | if (IS_ERR(trans)) { |
4246 | if (printk_ratelimit()) { | 4245 | printk_ratelimited(KERN_ERR "btrfs: fail to " |
4247 | printk(KERN_ERR "btrfs: fail to " | ||
4248 | "dirty inode %lu error %ld\n", | 4246 | "dirty inode %lu error %ld\n", |
4249 | inode->i_ino, PTR_ERR(trans)); | 4247 | inode->i_ino, PTR_ERR(trans)); |
4250 | } | ||
4251 | return; | 4248 | return; |
4252 | } | 4249 | } |
4253 | btrfs_set_trans_block_group(trans, inode); | 4250 | btrfs_set_trans_block_group(trans, inode); |
4254 | 4251 | ||
4255 | ret = btrfs_update_inode(trans, root, inode); | 4252 | ret = btrfs_update_inode(trans, root, inode); |
4256 | if (ret) { | 4253 | if (ret) { |
4257 | if (printk_ratelimit()) { | 4254 | printk_ratelimited(KERN_ERR "btrfs: fail to " |
4258 | printk(KERN_ERR "btrfs: fail to " | ||
4259 | "dirty inode %lu error %d\n", | 4255 | "dirty inode %lu error %d\n", |
4260 | inode->i_ino, ret); | 4256 | inode->i_ino, ret); |
4261 | } | ||
4262 | } | 4257 | } |
4263 | } | 4258 | } |
4264 | btrfs_end_transaction(trans, root); | 4259 | btrfs_end_transaction(trans, root); |