Skip to content

Commit

Permalink
Btrfs: Only do async bio submission for pdflush
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Mason <chris.mason@oracle.com>
  • Loading branch information
Chris Mason committed Sep 25, 2008
1 parent 699122f commit 7b859fe
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions fs/btrfs/disk-io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 7b859fe

Please sign in to comment.