projects
/
GitHub
/
mt8127
/
android_kernel_alcatel_ttab.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge tag 'v3.10.62' into update
[GitHub/mt8127/android_kernel_alcatel_ttab.git]
/
block
/
blk-lib.c
diff --git
a/block/blk-lib.c
b/block/blk-lib.c
index d6f50d572565ad41a730ec531ea4849a6ef042bb..9a32f5868fb9004dbf57802db688191d9b017f8f 100644
(file)
--- a/
block/blk-lib.c
+++ b/
block/blk-lib.c
@@
-121,6
+121,14
@@
int blkdev_issue_discard(struct block_device *bdev, sector_t sector,
atomic_inc(&bb.done);
submit_bio(type, bio);
atomic_inc(&bb.done);
submit_bio(type, bio);
+
+ /*
+ * We can loop for a long time in here, if someone does
+ * full device discards (like mkfs). Be nice and allow
+ * us to schedule out to avoid softlocking if preempt
+ * is disabled.
+ */
+ cond_resched();
}
blk_finish_plug(&plug);
}
blk_finish_plug(&plug);