Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 7633
b: refs/heads/master
c: b823825
h: refs/heads/master
i:
  7631: e54e6bf
v: v3
  • Loading branch information
Jens Axboe committed Jun 20, 2005
1 parent fd5a520 commit d5aca40
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: df46b9a44ceb5af2ea2351ce8e28ae7bd840b00f
refs/heads/master: b823825e8e09aac6dc1ca362cd5639a87329d636
11 changes: 0 additions & 11 deletions trunk/drivers/block/ll_rw_blk.c
Original file line number Diff line number Diff line change
Expand Up @@ -2177,16 +2177,6 @@ int blk_rq_unmap_user(struct request *rq, struct bio *bio, unsigned int ulen)

EXPORT_SYMBOL(blk_rq_unmap_user);

static int blk_rq_map_kern_endio(struct bio *bio, unsigned int bytes_done,
int error)
{
if (bio->bi_size)
return 1;

bio_put(bio);
return 0;
}

/**
* blk_rq_map_kern - map kernel data to a request, for REQ_BLOCK_PC usage
* @q: request queue where request should be inserted
Expand All @@ -2213,7 +2203,6 @@ struct request *blk_rq_map_kern(request_queue_t *q, int rw, void *kbuf,
if (!IS_ERR(bio)) {
if (rw)
bio->bi_rw |= (1 << BIO_RW);
bio->bi_end_io = blk_rq_map_kern_endio;

rq->bio = rq->biotail = bio;
blk_rq_bio_prep(q, rq, bio);
Expand Down
11 changes: 11 additions & 0 deletions trunk/fs/bio.c
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,16 @@ void bio_unmap_user(struct bio *bio)
bio_put(bio);
}

static int bio_map_kern_endio(struct bio *bio, unsigned int bytes_done, int err)
{
if (bio->bi_size)
return 1;

bio_put(bio);
return 0;
}


static struct bio *__bio_map_kern(request_queue_t *q, void *data,
unsigned int len, unsigned int gfp_mask)
{
Expand Down Expand Up @@ -734,6 +744,7 @@ static struct bio *__bio_map_kern(request_queue_t *q, void *data,
offset = 0;
}

bio->bi_end_io = bio_map_kern_endio;
return bio;
}

Expand Down

0 comments on commit d5aca40

Please sign in to comment.