]> bbs.cooldavid.org Git - net-next-2.6.git/blobdiff - drivers/md/raid1.c
md: use bio_kmalloc rather than bio_alloc when failure is acceptable.
[net-next-2.6.git] / drivers / md / raid1.c
index 3362cfc8073c70e7bca2a290aa5d91e842ebc2de..40f58d3b67ff1b7f737ef1b139d6ad69a2655084 100644 (file)
@@ -100,7 +100,7 @@ static void * r1buf_pool_alloc(gfp_t gfp_flags, void *data)
         * Allocate bios : 1 for reading, n-1 for writing
         */
        for (j = pi->raid_disks ; j-- ; ) {
-               bio = bio_alloc(gfp_flags, RESYNC_PAGES);
+               bio = bio_kmalloc(gfp_flags, RESYNC_PAGES);
                if (!bio)
                        goto out_free_bio;
                r1_bio->bios[j] = bio;