]> git.hungrycats.org Git - linux/commitdiff
btrfs: need_resched not needed with cond_resched
authorDavid Sterba <dsterba@suse.cz>
Thu, 8 Jan 2015 14:15:19 +0000 (15:15 +0100)
committerZygo Blaxell <zblaxell@serenity.furryterror.org>
Fri, 17 Apr 2015 15:56:32 +0000 (11:56 -0400)
Cleanup, no special reason to do

if (need_resched())
        cond_resched();

Signed-off-by: David Sterba <dsterba@suse.cz>
(cherry picked from commit 853d8ec4b288ce52b49e12beeef0f3659ac423ce)

fs/btrfs/volumes.c

index 621921f2f914652d5524cc5e076dc908b2387796..bff66e38fa43458354484edc8d82dc0842ae419b 100644 (file)
@@ -376,8 +376,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
@@ -410,8 +410,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);