dm-buffered: add cond_resched Add cond_resched to the "bio_for_each_segment" loop. Signed-off-by: Mikulas Patocka --- drivers/md/dm-buffered-target.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) Index: linux-2.6/drivers/md/dm-buffered-target.c =================================================================== --- linux-2.6.orig/drivers/md/dm-buffered-target.c +++ linux-2.6/drivers/md/dm-buffered-target.c @@ -229,8 +229,10 @@ static void __process_bio(struct buffere goto err; } - bio_for_each_segment(bvec, bio, bio->bi_iter) + bio_for_each_segment(bvec, bio, bio->bi_iter) { _io(bc, bio, &bvec); + cond_resched(); + } if (unlikely(bio->bi_status)) { goto err;