diff options
author | Theodore Ts'o <tytso@mit.edu> | 2010-10-28 03:30:04 +0200 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2010-10-28 03:30:04 +0200 |
commit | 5c2178e785244341d1e6f2bc3b62f20a337cc44f (patch) | |
tree | 669b8108fbe2708dff06dce25be6d70f68c553c4 /fs/jbd2/transaction.c | |
parent | ext4: fix NULL pointer dereference in print_daily_error_info() (diff) | |
download | linux-5c2178e785244341d1e6f2bc3b62f20a337cc44f.tar.xz linux-5c2178e785244341d1e6f2bc3b62f20a337cc44f.zip |
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>
Diffstat (limited to 'fs/jbd2/transaction.c')
-rw-r--r-- | fs/jbd2/transaction.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c index f3479d6e0a83..6bf0a242613e 100644 --- a/fs/jbd2/transaction.c +++ b/fs/jbd2/transaction.c @@ -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); |