Add Bull's online resize fix.
[ext4-patch-queue.git] / ext4-Set-journal-pointer-to-NULL-when-journal-is-released.patch
blobd91b0c14cc3f543784556e4f6ca31d3faee9d43c
1 ext4: Set journal pointer to NULL when journal is released
3 From: Jan Kara <jack@suse.cz>
5 Set sbi->s_journal to NULL after we call journal_destroy(). This
6 will be later needed because after journal_destroy() is called,
7 ext4_clear_inode() can still be called for some inodes (e.g. root
8 inode) and we'll need to detect there that journal doesn't exists
9 anymore.
11 Signed-off-by: Jan Kara <jack@suse.cz>
12 ---
13 fs/ext4/super.c | 2 ++
14 1 file changed, 2 insertions(+)
16 Index: linux-2.6.26-rc5/fs/ext4/super.c
17 ===================================================================
18 --- linux-2.6.26-rc5.orig/fs/ext4/super.c 2008-06-06 17:03:48.000000000 -0700
19 +++ linux-2.6.26-rc5/fs/ext4/super.c 2008-06-06 17:03:52.000000000 -0700
20 @@ -506,6 +506,7 @@ static void ext4_put_super (struct super
21 ext4_ext_release(sb);
22 ext4_xattr_put_super(sb);
23 jbd2_journal_destroy(sbi->s_journal);
24 + sbi->s_journal = NULL;
25 if (!(sb->s_flags & MS_RDONLY)) {
26 EXT4_CLEAR_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_RECOVER);
27 es->s_state = cpu_to_le16(sbi->s_mount_state);
28 @@ -2423,6 +2424,7 @@ cantfind_ext4:
30 failed_mount4:
31 jbd2_journal_destroy(sbi->s_journal);
32 + sbi->s_journal = NULL;
33 failed_mount3:
34 percpu_counter_destroy(&sbi->s_freeblocks_counter);
35 percpu_counter_destroy(&sbi->s_freeinodes_counter);