linux/fs/jbd2
Jiufei Xue 742b06b562 jbd2: check superblock mapped prior to committing
We hit a BUG at fs/buffer.c:3057 if we detached the nbd device
before unmounting ext4 filesystem.

The typical chain of events leading to the BUG:
jbd2_write_superblock
  submit_bh
    submit_bh_wbc
      BUG_ON(!buffer_mapped(bh));

The block device is removed and all the pages are invalidated. JBD2
was trying to write journal superblock to the block device which is
no longer present.

Fix this by checking the journal superblock's buffer head prior to
submitting.

Reported-by: Eric Ren <renzhen@linux.alibaba.com>
Signed-off-by: Jiufei Xue <jiufei.xue@linux.alibaba.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Jan Kara <jack@suse.cz>
Cc: stable@kernel.org
2019-04-06 18:57:40 -04:00
..
checkpoint.c jbd2: remove repeated assignments in __jbd2_log_wait_for_space() 2019-04-06 18:14:17 -04:00
commit.c jbd2: fix invalid descriptor block checksum 2019-03-01 00:30:00 -05:00
journal.c jbd2: check superblock mapped prior to committing 2019-04-06 18:57:40 -04:00
Kconfig
Makefile
recovery.c
revoke.c
transaction.c jbd2: jbd2_get_transaction does not need to return a value 2019-03-01 00:36:57 -05:00