From: Vyacheslav Dubeyko <[email protected]>
Subject: [PATCH] nilfs2: suggest to use dump_stack() in nilfs_error() and 
nilfs_warning()

This patch suggests to use dump_stack() call in nilfs_error() and
nilfs_warning() for more clear understanding of different type of
issues. As a result, end-users can report more informative
descriptions of issues.

Signed-off-by: Vyacheslav Dubeyko <[email protected]>
CC: Vyacheslav Dubeyko <[email protected]>
CC: Ryusuke Konishi <[email protected]>
---
 fs/nilfs2/inode.c |    1 -
 fs/nilfs2/super.c |    5 ++++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/fs/nilfs2/inode.c b/fs/nilfs2/inode.c
index 6252b17..745e96d 100644
--- a/fs/nilfs2/inode.c
+++ b/fs/nilfs2/inode.c
@@ -970,7 +970,6 @@ void nilfs_dirty_inode(struct inode *inode, int flags)
        if (is_bad_inode(inode)) {
                nilfs_warning(inode->i_sb, __func__,
                              "tried to mark bad_inode dirty. ignored.\n");
-               dump_stack();
                return;
        }
        if (mdi) {
diff --git a/fs/nilfs2/super.c b/fs/nilfs2/super.c
index 8c532b2..c6cd607 100644
--- a/fs/nilfs2/super.c
+++ b/fs/nilfs2/super.c
@@ -123,6 +123,8 @@ void nilfs_error(struct super_block *sb, const char 
*function,
 
        va_end(args);
 
+       dump_stack();
+
        if (!(sb->s_flags & MS_RDONLY)) {
                nilfs_set_error(sb);
 
@@ -152,8 +154,9 @@ void nilfs_warning(struct super_block *sb, const char 
*function,
               sb->s_id, function, &vaf);
 
        va_end(args);
-}
 
+       dump_stack();
+}
 
 struct inode *nilfs_alloc_inode(struct super_block *sb)
 {
-- 
1.7.9.5


--
To unsubscribe from this list: send the line "unsubscribe linux-nilfs" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to