btrfs: remove save_error_info()
authorAnand Jain <anand.jain@oracle.com>
Thu, 17 Mar 2016 02:38:57 +0000 (10:38 +0800)
committerDavid Sterba <dsterba@suse.com>
Thu, 28 Apr 2016 08:36:54 +0000 (10:36 +0200)
Actually save_error_info() sets the FS state to error and nothing else.
Further the word save doesn't induce caffeine when compared to the word
set in what actually it does.

So to make it better understandable move save_error_info() code to its
only consumer itself.

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/super.c

index cc077887bd9dffa85bfc4eb396c2cb2580d3c8d0..dab51118b972b6218451ff0528befbe674812895 100644 (file)
@@ -97,15 +97,6 @@ const char *btrfs_decode_error(int errno)
        return errstr;
 }
 
-static void save_error_info(struct btrfs_fs_info *fs_info)
-{
-       /*
-        * today we only save the error info into ram.  Long term we'll
-        * also send it down to the disk
-        */
-       set_bit(BTRFS_FS_STATE_ERROR, &fs_info->fs_state);
-}
-
 /* btrfs handle error by forcing the filesystem readonly */
 static void btrfs_handle_error(struct btrfs_fs_info *fs_info)
 {
@@ -170,8 +161,13 @@ void __btrfs_handle_fs_error(struct btrfs_fs_info *fs_info, const char *function
        }
 #endif
 
+       /*
+        * Today we only save the error info to memory.  Long term we'll
+        * also send it down to the disk
+        */
+       set_bit(BTRFS_FS_STATE_ERROR, &fs_info->fs_state);
+
        /* Don't go through full error handling during mount */
-       save_error_info(fs_info);
        if (sb->s_flags & MS_BORN)
                btrfs_handle_error(fs_info);
 }