mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-09 13:49:24 -04:00
ext4: yield during large unlinks
During large unlink operations on files with extents, we can use a lot
of CPU time. This adds a cond_resched() call when starting to examine
the next level of a multi-level extent tree. Multi-level extent trees
are rare in the first place, and this should rarely be executed.
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
This commit is contained in:
parent
e15f742ce8
commit
76828c8826
1 changed files with 3 additions and 0 deletions
|
|
@ -2835,6 +2835,9 @@ again:
|
|||
err = -EIO;
|
||||
break;
|
||||
}
|
||||
/* Yield here to deal with large extent trees.
|
||||
* Should be a no-op if we did IO above. */
|
||||
cond_resched();
|
||||
if (WARN_ON(i + 1 > depth)) {
|
||||
err = -EIO;
|
||||
break;
|
||||
|
|
|
|||
Loading…
Reference in a new issue