Message ID | 20170106141107.23953-7-mhocko@kernel.org (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c index a097048ed1a3..3a449150f834 100644 --- a/fs/jbd2/journal.c +++ b/fs/jbd2/journal.c @@ -206,6 +206,13 @@ static int kjournald2(void *arg) wake_up(&journal->j_wait_done_commit); /* + * Make sure that no allocations from this kernel thread will ever recurse + * to the fs layer because we are responsible for the transaction commit + * and any fs involvement might get stuck waiting for the trasn. commit. + */ + memalloc_nofs_save(); + + /* * And now, wait forever for commit wakeup events. */ write_lock(&journal->j_state_lock);