Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7b859fe7 authored by Chris Mason's avatar Chris Mason
Browse files

Btrfs: Only do async bio submission for pdflush

parent 699122f5
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -381,6 +381,13 @@ int btrfs_wq_submit_bio(struct btrfs_fs_info *fs_info, struct inode *inode,
{
	struct async_submit_bio *async;

	/*
	 * inline writerback should stay inline, only hop to the async
	 * queue if we're pdflush
	 */
	if (!current_is_pdflush())
		return submit_bio_hook(inode, rw, bio, mirror_num);

	async = kmalloc(sizeof(*async), GFP_NOFS);
	if (!async)
		return -ENOMEM;