|
@@ -43,6 +43,7 @@
|
|
|
#include <linux/backing-dev.h>
|
|
|
#include <linux/bitops.h>
|
|
|
#include <linux/ratelimit.h>
|
|
|
+#include <linux/sched/mm.h>
|
|
|
|
|
|
#define CREATE_TRACE_POINTS
|
|
|
#include <trace/events/jbd2.h>
|
|
@@ -205,6 +206,14 @@ static int kjournald2(void *arg)
|
|
|
journal->j_task = current;
|
|
|
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.
|
|
|
*/
|