btrfs: need_resched not needed with cond_resched
authorDavid Sterba <dsterba@suse.cz>
Thu, 8 Jan 2015 14:15:19 +0000 (15:15 +0100)
committerDavid Sterba <dsterba@suse.cz>
Tue, 3 Mar 2015 16:23:55 +0000 (17:23 +0100)
Cleanup, no special reason to do

if (need_resched())
        cond_resched();

Signed-off-by: David Sterba <dsterba@suse.cz>
fs/btrfs/volumes.c

index 8222f6f74147972ba1b654c12b013c55a3b60825..50bb7b8b17e86f79bd3df4b064571e2447f7d1b0 100644 (file)
@@ -366,8 +366,8 @@ loop_lock:
                btrfsic_submit_bio(cur->bi_rw, cur);
                num_run++;
                batch_run++;
-               if (need_resched())
-                       cond_resched();
+
+               cond_resched();
 
                /*
                 * we made progress, there is more work to do and the bdi
@@ -400,8 +400,7 @@ loop_lock:
                                 * against it before looping
                                 */
                                last_waited = ioc->last_waited;
-                               if (need_resched())
-                                       cond_resched();
+                               cond_resched();
                                continue;
                        }
                        spin_lock(&device->io_lock);