projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
769db45
)
[BLOCK] bio: init ->bi_bdev in bio_init()
author
Jens Axboe
<axboe@suse.de>
Mon, 9 Jan 2006 13:45:10 +0000
(14:45 +0100)
committer
Jens Axboe
<axboe@suse.de>
Mon, 9 Jan 2006 13:45:10 +0000
(14:45 +0100)
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>
fs/bio.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/bio.c
b/fs/bio.c
index dfe242a21eb4cb49d00d4ee54def5c024be1ea0b..7b30695899511ca64404f8061a9d1563573db44c 100644
(file)
--- a/
fs/bio.c
+++ b/
fs/bio.c
@@
-126,6
+126,7
@@
static void bio_fs_destructor(struct bio *bio)
inline void bio_init(struct bio *bio)
{
bio->bi_next = NULL;
+ bio->bi_bdev = NULL;
bio->bi_flags = 1 << BIO_UPTODATE;
bio->bi_rw = 0;
bio->bi_vcnt = 0;