From 7476ba1fc5e320764c73f7f88d95e29b32199c5c Mon Sep 17 00:00:00 2001 From: Chris Mason Date: Wed, 10 Mar 2010 15:33:32 -0500 Subject: [PATCH] --- yaml --- r: 188215 b: refs/heads/master c: 51684082b11c304829ea22193d4d96a5b1663b97 h: refs/heads/master i: 188213: 1e9bb604dd5f62b3b4a9e86cc34a2b520b75700e 188211: 40c84e400a060696e1d90de4a446b9a8253e03e2 188207: 177b444dce332ff839070ce2d0816da7d0e009e0 v: v3 --- [refs] | 2 +- trunk/fs/btrfs/volumes.c | 20 ++++++++++---------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/[refs] b/[refs] index 60697e8af37c..6090cace459b 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 4849f01d153be0f52b8191ee1be0ce492aa96811 +refs/heads/master: 51684082b11c304829ea22193d4d96a5b1663b97 diff --git a/trunk/fs/btrfs/volumes.c b/trunk/fs/btrfs/volumes.c index 41ecbb2347f2..ace2e8d7bbcd 100644 --- a/trunk/fs/btrfs/volumes.c +++ b/trunk/fs/btrfs/volumes.c @@ -325,16 +325,6 @@ static noinline int run_scheduled_bios(struct btrfs_device *device) num_sync_run = 0; blk_run_backing_dev(bdi, NULL); } - - cond_resched(); - if (again) - goto loop; - - spin_lock(&device->io_lock); - if (device->pending_bios.head || device->pending_sync_bios.head) - goto loop_lock; - spin_unlock(&device->io_lock); - /* * IO has already been through a long path to get here. Checksumming, * async helper threads, perhaps compression. We've done a pretty @@ -346,6 +336,16 @@ static noinline int run_scheduled_bios(struct btrfs_device *device) * cared about found its way down here. */ blk_run_backing_dev(bdi, NULL); + + cond_resched(); + if (again) + goto loop; + + spin_lock(&device->io_lock); + if (device->pending_bios.head || device->pending_sync_bios.head) + goto loop_lock; + spin_unlock(&device->io_lock); + done: return 0; }