提交 ded91f08 编写于 作者: X Xiao Guangrong 提交者: Chris Mason

Btrfs: clean up for wait_extent_bit()

We can just use cond_resched_lock().
Signed-off-by: NXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Signed-off-by: NLi Zefan <lizf@cn.fujitsu.com>
Signed-off-by: NChris Mason <chris.mason@oracle.com>
上级 3150b699
......@@ -648,11 +648,7 @@ int wait_extent_bit(struct extent_io_tree *tree, u64 start, u64 end, int bits)
if (start > end)
break;
if (need_resched()) {
spin_unlock(&tree->lock);
cond_resched();
spin_lock(&tree->lock);
}
cond_resched_lock(&tree->lock);
}
out:
spin_unlock(&tree->lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册