xfs
[Top] [All Lists]

[PATCH] xfs: fix duplicate message output

To: xfs@xxxxxxxxxxx
Subject: [PATCH] xfs: fix duplicate message output
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 12 Apr 2011 23:34:20 +1000
From: Dave Chinner <dchinner@xxxxxxxxxx>

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@xxxxxxxxxx>
---
 fs/xfs/linux-2.6/xfs_message.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/fs/xfs/linux-2.6/xfs_message.c b/fs/xfs/linux-2.6/xfs_message.c
index 3ca7956..9f76cce 100644
--- a/fs/xfs/linux-2.6/xfs_message.c
+++ b/fs/xfs/linux-2.6/xfs_message.c
@@ -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);
 }
 
-- 
1.7.2.3

<Prev in Thread] Current Thread [Next in Thread>