Add stable tags before pushing to Linus
[ext4-patch-queue.git] / save-error-to-disk-in-ext4_grp_locked_error
blob63485e2def4c87cdbcfe09ae466a6fdc8056bc53
1 ext4: save error to disk in __ext4_grp_locked_error()
3 From: Zhouyi Zhou <zhouzhouyi@gmail.com>
5 In the function __ext4_grp_locked_error(), __save_error_info()
6 is called to save error info in super block block, but does not sync
7 that information to disk to info the subsequence fsck after reboot.
9 This patch writes the error information to disk.  After this patch,
10 I think there is no obvious EXT4 error handle branches which leads to
11 "Remounting filesystem read-only" will leave the disk partition miss
12 the subsequence fsck.
14 Signed-off-by: Zhouyi Zhou <zhouzhouyi@gmail.com>
15 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
16 Cc: stable@vger.kernel.org
17 ---
18  fs/ext4/super.c | 1 +
19  1 file changed, 1 insertion(+)
21 diff --git a/fs/ext4/super.c b/fs/ext4/super.c
22 index 7c46693..7159438 100644
23 --- a/fs/ext4/super.c
24 +++ b/fs/ext4/super.c
25 @@ -742,6 +742,7 @@ __acquires(bitlock)
26         }
28         ext4_unlock_group(sb, grp);
29 +       ext4_commit_super(sb, 1);
30         ext4_handle_error(sb);
31         /*
32          * We only get here in the ERRORS_RO case; relocking the group
33 -- 
34 2.1.4