Skip to contentSkip to conversation

fs/fat: Use fat_msg() to replace printk() in __fat_fs_error()

PATCH In review Gu Zheng 2 participants 3 messages May 13, 2013 – May 14, 2013 VFAT/FAT/msdos filesystem

lore
Share & tools
lore

Gu Zheng

author
#0 lore raw

PATCH 1/1 fs/fat: Use fat_msg() to replace printk() in __fat_fs_error()

Quoted 1 line

From 87141ec058aad35ac55bc7c3fc2eb378566a5a6a Mon Sep 17 00:00:00 2001

From: Gu Zheng <[email protected]>
Date: Mon, 13 May 2013 17:48:19 +0900
Subject: [PATCH] fs/fat: Use fat_msg() to replace printk() in __fat_fs_error()

---
 fs/fat/misc.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)
fs/fat/misc.c +2 -3
index 359d307..628e22a 100644
@@ -30,7 +30,7 @@ void __fat_fs_error(struct super_block *sb, int report, const char *fmt, ...)
 		va_start(args, fmt);
 		vaf.fmt = fmt;
 		vaf.va = &args;
-		printk(KERN_ERR "FAT-fs (%s): error, %pV\n", sb->s_id, &vaf);
+		fat_msg(sb, KERN_ERR, "error, %pV", &vaf);
 		va_end(args);
 	}
 
@@ -38,8 +38,7 @@ void __fat_fs_error(struct super_block *sb, int report, const char *fmt, ...)
 		panic("FAT-fs (%s): fs panic from previous error\n", sb->s_id);
 	else if (opts->errors == FAT_ERRORS_RO && !(sb->s_flags & MS_RDONLY)) {
 		sb->s_flags |= MS_RDONLY;
-		printk(KERN_ERR "FAT-fs (%s): Filesystem has been "
-				"set read-only\n", sb->s_id);
+		fat_msg(sb, KERN_ERR, "Filesystem has been set read-only");
 	}
 }
 EXPORT_SYMBOL_GPL(__fat_fs_error);
Signature · 1 line
1.7.1
maintainer Acked-by on v1 1/1
#1 lore raw

fs/fat/misc.c void __fat_fs_error(struct super_block *sb, int report, const char *fmt, ...) · line 34

Quoted 8 lines · Gu Zheng
Quoted 1 line

From 87141ec058aad35ac55bc7c3fc2eb378566a5a6a Mon Sep 17 00:00:00 2001

From: Gu Zheng <[email protected]>
Date: Mon, 13 May 2013 17:48:19 +0900
Subject: [PATCH] fs/fat: Use fat_msg() to replace printk() in __fat_fs_error()

fs/fat/misc.c +1 -1
-		printk(KERN_ERR "FAT-fs (%s): error, %pV\n", sb->s_id, &vaf);
+		fat_msg(sb, KERN_ERR, "error, %pV", &vaf);
 		va_end(args);

I'm assuming nested "%pV" is works fine. If so,

Quoted 10 lines
fs/fat/misc.c +1 -2
@@ -38,8 +38,7 @@ void __fat_fs_error(struct super_block *sb, int report, const char *fmt, ...)
 		panic("FAT-fs (%s): fs panic from previous error\n", sb->s_id);
 	else if (opts->errors == FAT_ERRORS_RO && !(sb->s_flags & MS_RDONLY)) {
 		sb->s_flags |= MS_RDONLY;
-		printk(KERN_ERR "FAT-fs (%s): Filesystem has been "
-				"set read-only\n", sb->s_id);
+		fat_msg(sb, KERN_ERR, "Filesystem has been set read-only");
 	}
 }
 EXPORT_SYMBOL_GPL(__fat_fs_error);
Signature · 1 line
OGAWA Hirofumi <[email protected]>
author
#2 lore raw
Quoted 7 lines · OGAWA Hirofumi
Quoted 4 lines · Gu Zheng
Quoted 1 line

From 87141ec058aad35ac55bc7c3fc2eb378566a5a6a Mon Sep 17 00:00:00 2001

From: Gu Zheng <[email protected]>
Date: Mon, 13 May 2013 17:48:19 +0900
Subject: [PATCH] fs/fat: Use fat_msg() to replace printk() in __fat_fs_error()

Quoted 5 lines

fs/fat/misc.c void __fat_fs_error(struct super_block *sb, int report, const char *fmt, ...) · line 34

Quoted 3 lines
fs/fat/misc.c +1 -1
-		printk(KERN_ERR "FAT-fs (%s): error, %pV\n", sb->s_id, &vaf);
+		fat_msg(sb, KERN_ERR, "error, %pV", &vaf);
 		va_end(args);

I'm assuming nested "%pV" is works fine. If so,

It works fine, I've tested this.

Quoted 2 lines

Thanks!

Best regards,
Gu

Quoted 12 lines
Quoted 11 lines
fs/fat/misc.c +1 -2
@@ -38,8 +38,7 @@ void __fat_fs_error(struct super_block *sb, int report, const char *fmt, ...)
 		panic("FAT-fs (%s): fs panic from previous error\n", sb->s_id);
 	else if (opts->errors == FAT_ERRORS_RO && !(sb->s_flags & MS_RDONLY)) {
 		sb->s_flags |= MS_RDONLY;
-		printk(KERN_ERR "FAT-fs (%s): Filesystem has been "
-				"set read-only\n", sb->s_id);
+		fat_msg(sb, KERN_ERR, "Filesystem has been set read-only");
 	}
 }
 EXPORT_SYMBOL_GPL(__fat_fs_error);