summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorXiao Guangrong <xiaoguangrong@cn.fujitsu.com>2011-07-14 03:19:27 +0000
committerChris Mason <chris.mason@oracle.com>2011-08-01 14:32:38 -0400
commitded91f0814a349e36b3ca0eff497f816ad518fba (patch)
tree6efec3ebb541a560eebdb0754ee0f3edab96ff56 /fs
parent3150b6996934455d7f2da243939d80a9b839085a (diff)
downloadlinux-ded91f0814a349e36b3ca0eff497f816ad518fba.tar.gz
linux-ded91f0814a349e36b3ca0eff497f816ad518fba.tar.bz2
linux-ded91f0814a349e36b3ca0eff497f816ad518fba.zip
Btrfs: clean up for wait_extent_bit()
We can just use cond_resched_lock(). Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> Signed-off-by: Li Zefan <lizf@cn.fujitsu.com> Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/btrfs/extent_io.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 0d69425d0197..a0811e639f58 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -648,11 +648,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);