]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
block: remove the extra copy of bio_alloc_pages
authorStephen Rothwell <sfr@canb.auug.org.au>
Tue, 26 Mar 2013 06:26:45 +0000 (17:26 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 26 Mar 2013 06:27:38 +0000 (17:27 +1100)
Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
drivers/md/bcache/util.c
drivers/md/bcache/util.h

index dcec2e4f84ad4c7bfe88efeaa051b324e9521dd0..671a55d3489f81fe11a9fad8f519f6af6ea1eb3c 100644 (file)
@@ -237,24 +237,6 @@ start:             bv->bv_len      = min_t(size_t, PAGE_SIZE - bv->bv_offset,
 }
 EXPORT_SYMBOL_GPL(bio_map);
 
-int bio_alloc_pages(struct bio *bio, gfp_t gfp)
-{
-       int i;
-       struct bio_vec *bv;
-
-       bio_for_each_segment(bv, bio, i) {
-               bv->bv_page = alloc_page(gfp);
-               if (!bv->bv_page) {
-                       while (bv-- != bio->bi_io_vec + bio->bi_idx)
-                               __free_page(bv->bv_page);
-                       return -ENOMEM;
-               }
-       }
-
-       return 0;
-}
-EXPORT_SYMBOL_GPL(bio_alloc_pages);
-
 /*
  * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group (Any
  * use permitted, subject to terms of PostgreSQL license; see.)
index 56705fdcc1497ae347395162dbecab5f9e0114a6..499d7465e7a7819166388d8ee3c15949a3f0c7e5 100644 (file)
@@ -570,8 +570,6 @@ static inline unsigned fract_exp_two(unsigned x, unsigned fract_bits)
 
 void bio_map(struct bio *bio, void *base);
 
-int bio_alloc_pages(struct bio *bio, gfp_t gfp);
-
 static inline sector_t bdev_sectors(struct block_device *bdev)
 {
        return bdev->bd_inode->i_size >> 9;