aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnand Jain <anand.jain@oracle.com>2016-03-16 22:38:57 -0400
committerDavid Sterba <dsterba@suse.com>2016-04-28 04:36:54 -0400
commit0713d90c75745dc6148f6346d490e9ef63a4e8b4 (patch)
tree9e3348c3b0d3fba22f342abe20a892aa8e635cf6
parent13f48dc9094b56c5bffd8d57349a0a01a1926b2d (diff)
btrfs: remove save_error_info()
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>
-rw-r--r--fs/btrfs/super.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index cc077887bd9d..dab51118b972 100644
--- a/fs/btrfs/super.c
+++ b/fs/btrfs/super.c
@@ -97,15 +97,6 @@ const char *btrfs_decode_error(int errno)
97 return errstr; 97 return errstr;
98} 98}
99 99
100static void save_error_info(struct btrfs_fs_info *fs_info)
101{
102 /*
103 * today we only save the error info into ram. Long term we'll
104 * also send it down to the disk
105 */
106 set_bit(BTRFS_FS_STATE_ERROR, &fs_info->fs_state);
107}
108
109/* btrfs handle error by forcing the filesystem readonly */ 100/* btrfs handle error by forcing the filesystem readonly */
110static void btrfs_handle_error(struct btrfs_fs_info *fs_info) 101static void btrfs_handle_error(struct btrfs_fs_info *fs_info)
111{ 102{
@@ -170,8 +161,13 @@ void __btrfs_handle_fs_error(struct btrfs_fs_info *fs_info, const char *function
170 } 161 }
171#endif 162#endif
172 163
164 /*
165 * Today we only save the error info to memory. Long term we'll
166 * also send it down to the disk
167 */
168 set_bit(BTRFS_FS_STATE_ERROR, &fs_info->fs_state);
169
173 /* Don't go through full error handling during mount */ 170 /* Don't go through full error handling during mount */
174 save_error_info(fs_info);
175 if (sb->s_flags & MS_BORN) 171 if (sb->s_flags & MS_BORN)
176 btrfs_handle_error(fs_info); 172 btrfs_handle_error(fs_info);
177} 173}