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 9e41ea93ebc..76ee7a4ae00 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; |