xfs: fix duplicate message output
authorDave Chinner <dchinner@redhat.com>
Tue, 12 Apr 2011 13:34:20 +0000 (13:34 +0000)
committerAlex Elder <aelder@sgi.com>
Wed, 20 Apr 2011 16:36:49 +0000 (11:36 -0500)
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.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Alex Elder <aelder@sgi.com>
fs/xfs/linux-2.6/xfs_message.c

index 3ca795609113c259483099d0bbdaae9815b2cc0e..9f76cceb678d8aec6db86a53863c7c6fc0f36c19 100644 (file)
@@ -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);
 }