瀏覽代碼

btrfs: need_resched not needed with cond_resched

Cleanup, no special reason to do

if (need_resched())
        cond_resched();

Signed-off-by: David Sterba <dsterba@suse.cz>
David Sterba 10 年之前
父節點
當前提交
853d8ec4b2
共有 1 個文件被更改,包括 3 次插入4 次删除
  1. 3 4
      fs/btrfs/volumes.c

+ 3 - 4
fs/btrfs/volumes.c

@@ -366,8 +366,8 @@ loop_lock:
 		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 @@ loop_lock:
 				 * 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);