]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/jbd2/transaction.c
Merge tag 'pci-v4.12-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaa...
[karo-tx-linux.git] / fs / jbd2 / transaction.c
index 9ee4832b6f8b3664430e31bcf3775b412e1b81d8..2d30a6da7013112adafd08545b32cb00d179311c 100644 (file)
@@ -680,6 +680,12 @@ int jbd2__journal_restart(handle_t *handle, int nblocks, gfp_t gfp_mask)
 
        rwsem_release(&journal->j_trans_commit_map, 1, _THIS_IP_);
        handle->h_buffer_credits = nblocks;
+       /*
+        * Restore the original nofs context because the journal restart
+        * is basically the same thing as journal stop and start.
+        * start_this_handle will start a new nofs context.
+        */
+       memalloc_nofs_restore(handle->saved_alloc_context);
        ret = start_this_handle(journal, handle, gfp_mask);
        return ret;
 }