From 814efe2848dd7e30c542da1992a6630bc9be0eb2 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Wed, 29 Jun 2011 21:44:45 -0400 Subject: [PATCH] --- yaml --- r: 262089 b: refs/heads/master c: 275d3ba6b40d0f098693b9089c6fee9bd4e55d74 h: refs/heads/master i: 262087: 42e3902df553e46ad3b13ecc9a566d6e84a6c3b0 v: v3 --- [refs] | 2 +- trunk/fs/ext4/page-io.c | 6 +----- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index b061ea8ddc65..6f9886e7ea27 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9331b6261058eb85ae7c57ab8ac279e7fdaa9f04 +refs/heads/master: 275d3ba6b40d0f098693b9089c6fee9bd4e55d74 diff --git a/trunk/fs/ext4/page-io.c b/trunk/fs/ext4/page-io.c index 7bb8f76d470a..430c401d0895 100644 --- a/trunk/fs/ext4/page-io.c +++ b/trunk/fs/ext4/page-io.c @@ -285,11 +285,7 @@ static int io_submit_init(struct ext4_io_submit *io, io_end = ext4_init_io_end(inode, GFP_NOFS); if (!io_end) return -ENOMEM; - do { - bio = bio_alloc(GFP_NOIO, nvecs); - nvecs >>= 1; - } while (bio == NULL); - + bio = bio_alloc(GFP_NOIO, min(nvecs, BIO_MAX_PAGES)); bio->bi_sector = bh->b_blocknr * (bh->b_size >> 9); bio->bi_bdev = bh->b_bdev; bio->bi_private = io->io_end = io_end;