diff options
author | Jan Kara <jack@suse.cz> | 2008-07-11 19:27:31 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2008-07-11 19:27:31 -0400 |
commit | 47b4a50bebfd34b5e1fa2a9c673c8f31fa231cc1 (patch) | |
tree | df382e97cdc28fc231104b8d19cdcfc3099b9d68 | |
parent | 07031431072ece801d53d2c03d5e5bb21f4f64a4 (diff) |
ext4: Set journal pointer to NULL when journal is released
Set sbi->s_journal to NULL after we call journal_destroy(). This
will be later needed because after journal_destroy() is called,
ext4_clear_inode() can still be called for some inodes (e.g. root
inode) and we'll need to detect there that journal doesn't exists
anymore.
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
-rw-r--r-- | fs/ext4/super.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 80f06159ee99..1b330cd71ca8 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -506,6 +506,7 @@ static void ext4_put_super (struct super_block * sb) | |||
506 | ext4_ext_release(sb); | 506 | ext4_ext_release(sb); |
507 | ext4_xattr_put_super(sb); | 507 | ext4_xattr_put_super(sb); |
508 | jbd2_journal_destroy(sbi->s_journal); | 508 | jbd2_journal_destroy(sbi->s_journal); |
509 | sbi->s_journal = NULL; | ||
509 | if (!(sb->s_flags & MS_RDONLY)) { | 510 | if (!(sb->s_flags & MS_RDONLY)) { |
510 | EXT4_CLEAR_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_RECOVER); | 511 | EXT4_CLEAR_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_RECOVER); |
511 | es->s_state = cpu_to_le16(sbi->s_mount_state); | 512 | es->s_state = cpu_to_le16(sbi->s_mount_state); |
@@ -2423,6 +2424,7 @@ cantfind_ext4: | |||
2423 | 2424 | ||
2424 | failed_mount4: | 2425 | failed_mount4: |
2425 | jbd2_journal_destroy(sbi->s_journal); | 2426 | jbd2_journal_destroy(sbi->s_journal); |
2427 | sbi->s_journal = NULL; | ||
2426 | failed_mount3: | 2428 | failed_mount3: |
2427 | percpu_counter_destroy(&sbi->s_freeblocks_counter); | 2429 | percpu_counter_destroy(&sbi->s_freeblocks_counter); |
2428 | percpu_counter_destroy(&sbi->s_freeinodes_counter); | 2430 | percpu_counter_destroy(&sbi->s_freeinodes_counter); |