Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −5
Original line number Diff line number Diff line
@@ -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);