提交 853d8ec4 编写于 作者: D David Sterba

btrfs: need_resched not needed with cond_resched

Cleanup, no special reason to do

if (need_resched())
        cond_resched();
Signed-off-by: NDavid Sterba <dsterba@suse.cz>
上级 e57cf21e
...@@ -366,8 +366,8 @@ static noinline void run_scheduled_bios(struct btrfs_device *device) ...@@ -366,8 +366,8 @@ static noinline void run_scheduled_bios(struct btrfs_device *device)
btrfsic_submit_bio(cur->bi_rw, cur); btrfsic_submit_bio(cur->bi_rw, cur);
num_run++; num_run++;
batch_run++; batch_run++;
if (need_resched())
cond_resched(); cond_resched();
/* /*
* we made progress, there is more work to do and the bdi * we made progress, there is more work to do and the bdi
...@@ -400,8 +400,7 @@ static noinline void run_scheduled_bios(struct btrfs_device *device) ...@@ -400,8 +400,7 @@ static noinline void run_scheduled_bios(struct btrfs_device *device)
* against it before looping * against it before looping
*/ */
last_waited = ioc->last_waited; last_waited = ioc->last_waited;
if (need_resched()) cond_resched();
cond_resched();
continue; continue;
} }
spin_lock(&device->io_lock); spin_lock(&device->io_lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册