Loading block/bio.c +17 −18 Original line number Diff line number Diff line Loading @@ -1745,26 +1745,25 @@ static inline bool bio_remaining_done(struct bio *bio) **/ void bio_endio(struct bio *bio) { while (bio) { again: if (unlikely(!bio_remaining_done(bio))) break; return; /* * Need to have a real endio function for chained bios, * otherwise various corner cases will break (like stacking * block devices that save/restore bi_end_io) - however, we want * to avoid unbounded recursion and blowing the stack. Tail call * optimization would handle this, but compiling with frame * pointers also disables gcc's sibling call optimization. * Need to have a real endio function for chained bios, otherwise * various corner cases will break (like stacking block devices that * save/restore bi_end_io) - however, we want to avoid unbounded * recursion and blowing the stack. Tail call optimization would * handle this, but compiling with frame pointers also disables * gcc's sibling call optimization. */ if (bio->bi_end_io == bio_chain_endio) { bio = __bio_chain_endio(bio); } else { goto again; } if (bio->bi_end_io) bio->bi_end_io(bio); bio = NULL; } } } EXPORT_SYMBOL(bio_endio); Loading Loading
block/bio.c +17 −18 Original line number Diff line number Diff line Loading @@ -1745,26 +1745,25 @@ static inline bool bio_remaining_done(struct bio *bio) **/ void bio_endio(struct bio *bio) { while (bio) { again: if (unlikely(!bio_remaining_done(bio))) break; return; /* * Need to have a real endio function for chained bios, * otherwise various corner cases will break (like stacking * block devices that save/restore bi_end_io) - however, we want * to avoid unbounded recursion and blowing the stack. Tail call * optimization would handle this, but compiling with frame * pointers also disables gcc's sibling call optimization. * Need to have a real endio function for chained bios, otherwise * various corner cases will break (like stacking block devices that * save/restore bi_end_io) - however, we want to avoid unbounded * recursion and blowing the stack. Tail call optimization would * handle this, but compiling with frame pointers also disables * gcc's sibling call optimization. */ if (bio->bi_end_io == bio_chain_endio) { bio = __bio_chain_endio(bio); } else { goto again; } if (bio->bi_end_io) bio->bi_end_io(bio); bio = NULL; } } } EXPORT_SYMBOL(bio_endio); Loading