From: Chris Mason Date: Wed, 16 Apr 2008 17:06:16 +0000 (-0400) Subject: Btrfs: Only do async bio submission for pdflush X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=7b859fe7cd383fa5e7e379884a748680d0af7bcc;p=linux-beck.git Btrfs: Only do async bio submission for pdflush Signed-off-by: Chris Mason --- diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c index 9e41ea93ebce..76ee7a4ae00c 100644 --- a/fs/btrfs/disk-io.c +++ b/fs/btrfs/disk-io.c @@ -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;