Skip to contentSkip to conversation

xfs: fix duplicate message output

PATCH In review Dave Chinner 3 participants 4 messages Apr 12, 2011 – Apr 15, 2011 XFS filesystem

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xfs: fix duplicate message output

From: Dave Chinner <[email protected]>

Commit 957935dc ("xfs: fix xfs_debug warnings" broke the logic in __xfs_printk(). Instead of only printing one of two possible output strings based on whether the fs has a name or not, it outputs both. Fix it to only output one message again.

---
 fs/xfs/linux-2.6/xfs_message.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
fs/xfs/linux-2.6/xfs_message.c +3 -1
index 3ca7956..9f76cce 100644
@@ -34,8 +34,10 @@ __xfs_printk(
 	const struct xfs_mount	*mp,
 	struct va_format	*vaf)
 {
-	if (mp && mp->m_fsname)
+	if (mp && mp->m_fsname) {
 		printk("%sXFS (%s): %pV\n", level, mp->m_fsname, vaf);
+		return;
+	}
 	printk("%sXFS: %pV\n", level, vaf);
 }
 
Signature · 6 lines
1.7.2.3

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Reviewed-by on v1 1/1
#1 lore raw
Quoted 6 lines · Dave Chinner

From: Dave Chinner <[email protected]>

Commit 957935dc ("xfs: fix xfs_debug warnings" broke the logic in __xfs_printk(). Instead of only printing one of two possible output strings based on whether the fs has a name or not, it outputs both. Fix it to only output one message again.

My fault, sorry.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#2 lore raw
Quoted 11 lines · Christoph Hellwig
Quoted 6 lines · Dave Chinner

From: Dave Chinner <[email protected]>

Commit 957935dc ("xfs: fix xfs_debug warnings" broke the logic in __xfs_printk(). Instead of only printing one of two possible output strings based on whether the fs has a name or not, it outputs both. Fix it to only output one message again.

My fault, sorry.

And since I recently upgraded my compiler this bug even causes 085 to oops the kernel for me, so pushing it ASAP would be good.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Reviewed-by on v1 1/1
#3 lore raw
In reply to Dave Chinner
Quoted 8 lines · Dave Chinner

From: Dave Chinner <[email protected]>

Commit 957935dc ("xfs: fix xfs_debug warnings" broke the logic in __xfs_printk(). Instead of only printing one of two possible output strings based on whether the fs has a name or not, it outputs both. Fix it to only output one message again.

Looks good.

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs