summaryrefslogtreecommitdiff
path: root/block/compat_ioctl.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-01-29 08:51:56 +1100
committerLinus Torvalds <torvalds@linux-foundation.org>2008-01-29 08:51:56 +1100
commit8d01eddf292dcd78b640418c80fb300532799cd4 (patch)
treedd7f816423463e5ad10f15af22fdbd5b75cc6184 /block/compat_ioctl.c
parentf0f0052069989b80d2a3e50c9cd2f2a650bc1aea (diff)
parentfa0ccd837e3dddb44c7db2f128a8bb7e4eabc21a (diff)
Merge branch 'for-2.6.25' of git://git.kernel.dk/linux-2.6-block
* 'for-2.6.25' of git://git.kernel.dk/linux-2.6-block: block: implement drain buffers __bio_clone: don't calculate hw/phys segment counts block: allow queue dma_alignment of zero blktrace: Add blktrace ioctls to SCSI generic devices
Diffstat (limited to 'block/compat_ioctl.c')
-rw-r--r--block/compat_ioctl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/block/compat_ioctl.c b/block/compat_ioctl.c
index cae0a852619e..b73373216b0e 100644
--- a/block/compat_ioctl.c
+++ b/block/compat_ioctl.c
@@ -545,6 +545,7 @@ static int compat_blk_trace_setup(struct block_device *bdev, char __user *arg)
struct blk_user_trace_setup buts;
struct compat_blk_user_trace_setup cbuts;
struct request_queue *q;
+ char b[BDEVNAME_SIZE];
int ret;
q = bdev_get_queue(bdev);
@@ -554,6 +555,8 @@ static int compat_blk_trace_setup(struct block_device *bdev, char __user *arg)
if (copy_from_user(&cbuts, arg, sizeof(cbuts)))
return -EFAULT;
+ strcpy(b, bdevname(bdev, b));
+
buts = (struct blk_user_trace_setup) {
.act_mask = cbuts.act_mask,
.buf_size = cbuts.buf_size,
@@ -565,7 +568,7 @@ static int compat_blk_trace_setup(struct block_device *bdev, char __user *arg)
memcpy(&buts.name, &cbuts.name, 32);
mutex_lock(&bdev->bd_mutex);
- ret = do_blk_trace_setup(q, bdev, &buts);
+ ret = do_blk_trace_setup(q, b, bdev->bd_dev, &buts);
mutex_unlock(&bdev->bd_mutex);
if (ret)
return ret;