diff options
Diffstat (limited to 'fs/btrfs/extent-tree.c')
-rw-r--r-- | fs/btrfs/extent-tree.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/btrfs/extent-tree.c b/fs/btrfs/extent-tree.c index 2fe21fa74913..dc84daee6bc4 100644 --- a/fs/btrfs/extent-tree.c +++ b/fs/btrfs/extent-tree.c | |||
@@ -302,10 +302,11 @@ again: | |||
302 | else if (ret) | 302 | else if (ret) |
303 | break; | 303 | break; |
304 | 304 | ||
305 | if (need_resched()) { | 305 | if (need_resched() || |
306 | btrfs_transaction_in_commit(fs_info)) { | ||
306 | btrfs_release_path(fs_info->extent_root, path); | 307 | btrfs_release_path(fs_info->extent_root, path); |
307 | up_read(&fs_info->extent_commit_sem); | 308 | up_read(&fs_info->extent_commit_sem); |
308 | cond_resched(); | 309 | schedule_timeout(1); |
309 | goto again; | 310 | goto again; |
310 | } | 311 | } |
311 | 312 | ||