Commit ded91f08 authored by Xiao Guangrong's avatar Xiao Guangrong Committed by Chris Mason

Btrfs: clean up for wait_extent_bit()

We can just use cond_resched_lock().
Signed-off-by: default avatarXiao Guangrong <xiaoguangrong@cn.fujitsu.com>
Signed-off-by: default avatarLi Zefan <lizf@cn.fujitsu.com>
Signed-off-by: default avatarChris Mason <chris.mason@oracle.com>
parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment