Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Advertisement

Kernel v2.6.24-git10 /fs/bio.c

Filename:/fs/bio.c
Lines Added:4
Lines Deleted:4
Also changed in: (Previous) 2.6.24-git9  2.6.24-git8  2.6.24-git7  2.6.24-git6  2.6.24-git5  2.6.24 
(Following) 2.6.24-git11  2.6.24-git12  2.6.24-git13  2.6.24-git14  2.6.24-git15  2.6.24-git16 

Location
[  2.6.24-git10
  [  fs
     o  bio.c

Patch

diff --git a/fs/bio.c b/fs/bio.c
index d59ddbf..242e409 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -248,11 +248,13 @@ inline int bio_hw_segments(struct request_queue *q, struct bio *bio)
  */
 void __bio_clone(struct bio *bio, struct bio *bio_src)
 {
-   struct request_queue *q = bdev_get_queue(bio_src->bi_bdev);
-
    memcpy(bio->bi_io_vec, bio_src->bi_io_vec,
       bio_src->bi_max_vecs * sizeof(struct bio_vec));
 
+   /*
+    * most users will be overriding ->bi_bdev with a new target,
+    * so we don't set nor calculate new physical/hw segment counts here
+    */
    bio->bi_sector = bio_src->bi_sector;
    bio->bi_bdev = bio_src->bi_bdev;
    bio->bi_flags |= 1 << BIO_CLONED;
@@ -260,8 +262,6 @@ void __bio_clone(struct bio *bio, struct bio *bio_src)
    bio->bi_vcnt = bio_src->bi_vcnt;
    bio->bi_size = bio_src->bi_size;
    bio->bi_idx = bio_src->bi_idx;
-   bio_phys_segments(q, bio);
-   bio_hw_segments(q, bio);
 }
 
 /**


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.