提交 7b859fe7 编写于 作者: C Chris Mason

Btrfs: Only do async bio submission for pdflush

Signed-off-by: NChris Mason <chris.mason@oracle.com>
上级 699122f5
...@@ -381,6 +381,13 @@ int btrfs_wq_submit_bio(struct btrfs_fs_info *fs_info, struct inode *inode, ...@@ -381,6 +381,13 @@ int btrfs_wq_submit_bio(struct btrfs_fs_info *fs_info, struct inode *inode,
{ {
struct async_submit_bio *async; 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); async = kmalloc(sizeof(*async), GFP_NOFS);
if (!async) if (!async)
return -ENOMEM; return -ENOMEM;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册