aboutsummaryrefslogtreecommitdiffstats
path: root/fs/bio.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2006-01-09 08:45:10 -0500
committerJens Axboe <axboe@suse.de>2006-01-09 08:45:10 -0500
commit0ea60b5ad8c3630e8f44c443f173d841be7fc701 (patch)
tree9a8d23c797439a03dcccf26678994783d12f1bbb /fs/bio.c
parent769db45b73896a88d6b40e3e648dfc50a155ec93 (diff)
[BLOCK] bio: init ->bi_bdev in bio_init()
For SG_IO requests, bio->bi_bdev may not be explicitly initialized. So make bio_init() clear the field to make sure it's always NULL or valid. Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'fs/bio.c')
-rw-r--r--fs/bio.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/bio.c b/fs/bio.c
index dfe242a21eb4..7b3069589951 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -126,6 +126,7 @@ static void bio_fs_destructor(struct bio *bio)
126inline void bio_init(struct bio *bio) 126inline void bio_init(struct bio *bio)
127{ 127{
128 bio->bi_next = NULL; 128 bio->bi_next = NULL;
129 bio->bi_bdev = NULL;
129 bio->bi_flags = 1 << BIO_UPTODATE; 130 bio->bi_flags = 1 << BIO_UPTODATE;
130 bio->bi_rw = 0; 131 bio->bi_rw = 0;
131 bio->bi_vcnt = 0; 132 bio->bi_vcnt = 0;