From: Xiao Guangrong <xiaoguangr...@cn.fujitsu.com> We can just use cond_resched_lock().
Signed-off-by: Xiao Guangrong <xiaoguangr...@cn.fujitsu.com> Signed-off-by: Li Zefan <l...@cn.fujitsu.com> --- fs/btrfs/extent_io.c | 6 +----- 1 files changed, 1 insertions(+), 5 deletions(-) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 6c7394f..1959a63 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -658,11 +658,7 @@ again: 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); -- 1.7.3.1 -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html