Hi, all. I alloc a bio and add some pages into it, can I free bio and pages in bi_end_io()? For example, here is some code snipets: ================================================================================ /* This is in irq context, we can't sleep here. So, does __free_page() will sleep? */ int my_end_io(struct bio *bio, int error) { struct page *page = bio->bi_private; __free_page(page); bio_put(bio); return 0; } int some_function(int rw) { bio = bio_alloc(GFP_KERNEL, 1); page = page_alloc(); bio_add_page(bio, page, PAGE_SIZE, 0); bio->bi_end_io = my_end_io; bio->bi_private = page; submit_bio(rw, bio); } ================================================================================ Thanks. mofaph@xxxxxxxxx 2014/8/11 _______________________________________________ Kernelnewbies mailing list Kernelnewbies@xxxxxxxxxxxxxxxxx http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies