[PATCH 05/28] super: Use current logging styles

From: Joe Perches
Date: Tue Nov 29 2011 - 21:15:35 EST


Add and use pr_fmt and pr_<level>
Add printk level KERN_CRIT to "busy inodes after dismount" message.
Coalesce long format.

Signed-off-by: Joe Perches <joe@xxxxxxxxxxx>
---
fs/super.c | 20 ++++++++++----------
1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/fs/super.c b/fs/super.c
index b83d1c1..23ff118 100644
--- a/fs/super.c
+++ b/fs/super.c
@@ -20,6 +20,8 @@
* Heavily rewritten for 'one fs - one tree' dcache architecture. AV, Mar 2000
*/

+#define pr_fmt(fmt) "VFS: " fmt
+
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/acct.h>
@@ -393,9 +395,8 @@ void generic_shutdown_super(struct super_block *sb)
sop->put_super(sb);

if (!list_empty(&sb->s_inodes)) {
- printk("VFS: Busy inodes after unmount of %s. "
- "Self-destruct in 5 seconds. Have a nice day...\n",
- sb->s_id);
+ pr_crit("Busy inodes after unmount of %s. Self-destruct in 5 seconds. Have a nice day...\n",
+ sb->s_id);
}
}
spin_lock(&sb_lock);
@@ -777,7 +778,7 @@ static void do_emergency_remount(struct work_struct *work)
__put_super(p);
spin_unlock(&sb_lock);
kfree(work);
- printk("Emergency Remount complete\n");
+ pr_info("Emergency Remount complete\n");
}

void emergency_remount(void)
@@ -1110,8 +1111,9 @@ mount_fs(struct file_system_type *type, int flags, const char *name, void *data)
* this warning for a little while to try and catch filesystems that
* violate this rule.
*/
- WARN((sb->s_maxbytes < 0), "%s set sb->s_maxbytes to "
- "negative value (%lld)\n", type->name, sb->s_maxbytes);
+ WARN((sb->s_maxbytes < 0),
+ "%s set sb->s_maxbytes to negative value (%lld)\n",
+ type->name, sb->s_maxbytes);

up_write(&sb->s_umount);
free_secdata(secdata);
@@ -1163,8 +1165,7 @@ int freeze_super(struct super_block *sb)
if (sb->s_op->freeze_fs) {
ret = sb->s_op->freeze_fs(sb);
if (ret) {
- printk(KERN_ERR
- "VFS:Filesystem freeze failed\n");
+ pr_err("Filesystem freeze failed\n");
sb->s_frozen = SB_UNFROZEN;
deactivate_locked_super(sb);
return ret;
@@ -1197,8 +1198,7 @@ int thaw_super(struct super_block *sb)
if (sb->s_op->unfreeze_fs) {
error = sb->s_op->unfreeze_fs(sb);
if (error) {
- printk(KERN_ERR
- "VFS:Filesystem thaw failed\n");
+ pr_err("Filesystem thaw failed\n");
sb->s_frozen = SB_FREEZE_TRANS;
up_write(&sb->s_umount);
return error;
--
1.7.6.405.gc1be0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/