summaryrefslogtreecommitdiff
path: root/fs/btrfs
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2012-03-23 18:22:46 +0400
committerChris Mason <chris.mason@oracle.com>2012-03-27 01:04:24 +0400
commitf3f266ab1bfe4770375d24fa8e72a03278e9450a (patch)
tree7b3e7f79cad427e978230da6afa8d51a4aa6b58f /fs/btrfs
parentf7c79f30cb2d3883488e70cafc9e3a7edd4b9fdb (diff)
downloadlinux-f3f266ab1bfe4770375d24fa8e72a03278e9450a.tar.xz
Btrfs: don't use threaded IO completion helpers for metadata writes
The metadata write IO completion code is now simple enough that we don't need the threaded helpers anymore. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r--fs/btrfs/disk-io.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index c54aec87e89d..53c5ea702799 100644
--- a/fs/btrfs/disk-io.c
+++ b/fs/btrfs/disk-io.c
@@ -840,15 +840,15 @@ static int btree_submit_bio_hook(struct inode *inode, int rw, struct bio *bio,
{
int ret;
- ret = btrfs_bio_wq_end_io(BTRFS_I(inode)->root->fs_info,
- bio, 1);
- BUG_ON(ret);
-
if (!(rw & REQ_WRITE)) {
+
/*
* called for a read, do the setup so that checksum validation
* can happen in the async kernel threads
*/
+ ret = btrfs_bio_wq_end_io(BTRFS_I(inode)->root->fs_info,
+ bio, 1);
+ BUG_ON(ret);
return btrfs_map_bio(BTRFS_I(inode)->root, rw, bio,
mirror_num, 0);
}