add patch fix-comments-in-ext4_swap_extents
[ext4-patch-queue.git] / shutdown-should-not-prevent-get_write_access
blob054dddca9ddd4427cb9399f80a7ddd8e3845bcb9
1 ext4: shutdown should not prevent get_write_access
3 The ext4 forced shutdown flag needs to prevent new handles from being
4 started, but it needs to allow existing handles to complete.  So the
5 forced shutdown flag should not force ext4_journal_get_write_access to
6 fail.
8 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
9 Cc: stable@vger.kernel.org
10 ---
11  fs/ext4/ext4_jbd2.c | 7 -------
12  1 file changed, 7 deletions(-)
14 diff --git a/fs/ext4/ext4_jbd2.c b/fs/ext4/ext4_jbd2.c
15 index 2d593201cf7a..7c70b08d104c 100644
16 --- a/fs/ext4/ext4_jbd2.c
17 +++ b/fs/ext4/ext4_jbd2.c
18 @@ -166,13 +166,6 @@ int __ext4_journal_get_write_access(const char *where, unsigned int line,
19         might_sleep();
21         if (ext4_handle_valid(handle)) {
22 -               struct super_block *sb;
24 -               sb = handle->h_transaction->t_journal->j_private;
25 -               if (unlikely(ext4_forced_shutdown(EXT4_SB(sb)))) {
26 -                       jbd2_journal_abort_handle(handle);
27 -                       return -EIO;
28 -               }
29                 err = jbd2_journal_get_write_access(handle, bh);
30                 if (err)
31                         ext4_journal_abort_handle(where, line, __func__, bh,