aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2006-12-19 05:12:46 -0500
committerJens Axboe <jens.axboe@oracle.com>2006-12-19 05:12:46 -0500
commit8e5cfc45e7527eb5c8a9a22d56a7b9227e7c0913 (patch)
tree7be7c45168af77518bd6a47601e2f9e31b967dba /drivers
parent48785bb9fa39415d7553e234946442579dfcf591 (diff)
[PATCH] Fixup blk_rq_unmap_user() API
The blk_rq_unmap_user() API is not very nice. It expects the caller to know that rq->bio has to be reset to the original bio, and it will silently do nothing if that is not done. Instead make it explicit that we need to pass in the first bio, by expecting a bio argument. Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/cdrom/cdrom.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c
index e4a2f8f3a1d7..66d028d30439 100644
--- a/drivers/cdrom/cdrom.c
+++ b/drivers/cdrom/cdrom.c
@@ -2139,8 +2139,7 @@ static int cdrom_read_cdda_bpc(struct cdrom_device_info *cdi, __u8 __user *ubuf,
2139 cdi->last_sense = s->sense_key; 2139 cdi->last_sense = s->sense_key;
2140 } 2140 }
2141 2141
2142 rq->bio = bio; 2142 if (blk_rq_unmap_user(bio))
2143 if (blk_rq_unmap_user(rq))
2144 ret = -EFAULT; 2143 ret = -EFAULT;
2145 2144
2146 if (ret) 2145 if (ret)