Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=2b94de552e07610dfa79fc49ea49d1cfa5cd9ce8
Commit:     2b94de552e07610dfa79fc49ea49d1cfa5cd9ce8
Parent:     4fa253f33c1d4d6402de9eaacefdb45a47ed116d
Author:     Jens Axboe <[EMAIL PROTECTED]>
AuthorDate: Wed Jul 18 13:14:03 2007 +0200
Committer:  Jens Axboe <[EMAIL PROTECTED]>
CommitDate: Tue Oct 16 11:03:51 2007 +0200

    bio: use memset() in bio_init()
    
    Use memset() to clear the bio, instead of doing each field manually.
    
    Signed-off-by: Jens Axboe <[EMAIL PROTECTED]>
---
 fs/bio.c |   14 +-------------
 1 files changed, 1 insertions(+), 13 deletions(-)

diff --git a/fs/bio.c b/fs/bio.c
index 5f604f2..ac987fc 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -127,21 +127,9 @@ static void bio_fs_destructor(struct bio *bio)
 
 void bio_init(struct bio *bio)
 {
-       bio->bi_next = NULL;
-       bio->bi_bdev = NULL;
+       memset(bio, 0, sizeof(*bio));
        bio->bi_flags = 1 << BIO_UPTODATE;
-       bio->bi_rw = 0;
-       bio->bi_vcnt = 0;
-       bio->bi_idx = 0;
-       bio->bi_phys_segments = 0;
-       bio->bi_hw_segments = 0;
-       bio->bi_hw_front_size = 0;
-       bio->bi_hw_back_size = 0;
-       bio->bi_size = 0;
-       bio->bi_max_vecs = 0;
-       bio->bi_end_io = NULL;
        atomic_set(&bio->bi_cnt, 1);
-       bio->bi_private = NULL;
 }
 
 /**
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to