# This is a BitKeeper generated patch for the following project: # Project Name: Linux kernel tree # This patch format is intended for GNU patch command version 2.5 or higher. # This patch includes the following deltas: # ChangeSet 1.572 -> 1.573 # fs/xfs/pagebuf/page_buf.c 1.4 -> 1.5 # # The following is the BitKeeper ChangeSet Log # -------------------------------------------- # 02/09/18 axboe@burns.home.kernel.dk 1.573 # xfs now needs to use bio_add_page(), or it will build bio's that are # too big. also doesn't need to call bio_init() after bio_alloc(). # -------------------------------------------- # diff -Nru a/fs/xfs/pagebuf/page_buf.c b/fs/xfs/pagebuf/page_buf.c --- a/fs/xfs/pagebuf/page_buf.c Wed Sep 18 16:36:22 2002 +++ b/fs/xfs/pagebuf/page_buf.c Wed Sep 18 16:36:22 2002 @@ -1453,7 +1453,6 @@ bio = bio_alloc(GFP_NOIO, nr_pages); BUG_ON(bio == NULL); - bio_init(bio); bio->bi_bdev = pb->pb_target->pbr_bdev; bio->bi_sector = sector; bio->bi_end_io = bio_end_io_pagebuf; @@ -1467,12 +1466,8 @@ if (nbytes > size) nbytes = size; - bio->bi_vcnt++; - bio->bi_size += nbytes; - - bvec->bv_page = pb->pb_pages[map_i]; - bvec->bv_len = nbytes; - bvec->bv_offset = offset; + if (bio_add_page(bio, pb->pb_pages[map_i], nbytes, offset)) + break; offset = 0;