diff options
-rw-r--r-- | fs/btrfs/volumes.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c index 41ecbb2347f2..ace2e8d7bbcd 100644 --- a/fs/btrfs/volumes.c +++ b/fs/btrfs/volumes.c | |||
@@ -325,16 +325,6 @@ loop_lock: | |||
325 | num_sync_run = 0; | 325 | num_sync_run = 0; |
326 | blk_run_backing_dev(bdi, NULL); | 326 | blk_run_backing_dev(bdi, NULL); |
327 | } | 327 | } |
328 | |||
329 | cond_resched(); | ||
330 | if (again) | ||
331 | goto loop; | ||
332 | |||
333 | spin_lock(&device->io_lock); | ||
334 | if (device->pending_bios.head || device->pending_sync_bios.head) | ||
335 | goto loop_lock; | ||
336 | spin_unlock(&device->io_lock); | ||
337 | |||
338 | /* | 328 | /* |
339 | * IO has already been through a long path to get here. Checksumming, | 329 | * IO has already been through a long path to get here. Checksumming, |
340 | * async helper threads, perhaps compression. We've done a pretty | 330 | * async helper threads, perhaps compression. We've done a pretty |
@@ -346,6 +336,16 @@ loop_lock: | |||
346 | * cared about found its way down here. | 336 | * cared about found its way down here. |
347 | */ | 337 | */ |
348 | blk_run_backing_dev(bdi, NULL); | 338 | blk_run_backing_dev(bdi, NULL); |
339 | |||
340 | cond_resched(); | ||
341 | if (again) | ||
342 | goto loop; | ||
343 | |||
344 | spin_lock(&device->io_lock); | ||
345 | if (device->pending_bios.head || device->pending_sync_bios.head) | ||
346 | goto loop_lock; | ||
347 | spin_unlock(&device->io_lock); | ||
348 | |||
349 | done: | 349 | done: |
350 | return 0; | 350 | return 0; |
351 | } | 351 | } |