jbd2: Add sanity check for attempts to start handle during umount
An attempt to modify the file system during the call to jbd2_destroy_journal() can lead to a system lockup. So add some checking to make it much more obvious when this happens to and to determine where the offending code is located. Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
@@ -156,6 +156,7 @@ alloc_transaction:
|
||||
*/
|
||||
repeat:
|
||||
read_lock(&journal->j_state_lock);
|
||||
BUG_ON(journal->j_flags & JBD2_UNMOUNT);
|
||||
if (is_journal_aborted(journal) ||
|
||||
(journal->j_errno != 0 && !(journal->j_flags & JBD2_ACK_ERR))) {
|
||||
read_unlock(&journal->j_state_lock);
|
||||
|
Reference in New Issue
Block a user