diff options
author | Chris Mason <chris.mason@oracle.com> | 2008-04-16 13:06:16 -0400 |
---|---|---|
committer | Chris Mason <chris.mason@oracle.com> | 2008-09-25 11:04:01 -0400 |
commit | 7b859fe7cd383fa5e7e379884a748680d0af7bcc (patch) | |
tree | e60599df597a4533826fdee5c872793ec82de146 /fs/btrfs | |
parent | 699122f55904bec252ea4f8a64228ce98e3d9fda (diff) |
Btrfs: Only do async bio submission for pdflush
Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/disk-io.c | 7 |
1 files changed, 7 insertions, 0 deletions
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, | |||
381 | { | 381 | { |
382 | struct async_submit_bio *async; | 382 | struct async_submit_bio *async; |
383 | 383 | ||
384 | /* | ||
385 | * inline writerback should stay inline, only hop to the async | ||
386 | * queue if we're pdflush | ||
387 | */ | ||
388 | if (!current_is_pdflush()) | ||
389 | return submit_bio_hook(inode, rw, bio, mirror_num); | ||
390 | |||
384 | async = kmalloc(sizeof(*async), GFP_NOFS); | 391 | async = kmalloc(sizeof(*async), GFP_NOFS); |
385 | if (!async) | 392 | if (!async) |
386 | return -ENOMEM; | 393 | return -ENOMEM; |