[PATCH] Copy XFS readdir hack into nfsd code.
[safe/jmp/linux-2.6] / block / compat_ioctl.c
index b733732..1e559fb 100644 (file)
@@ -555,7 +555,7 @@ 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));
+       bdevname(bdev, b);
 
        buts = (struct blk_user_trace_setup) {
                .act_mask = cbuts.act_mask,
@@ -624,7 +624,6 @@ static int compat_blkdev_driver_ioctl(struct inode *inode, struct file *file,
        case HDIO_GET_IDENTITY:
        case HDIO_DRIVE_TASK:
        case HDIO_DRIVE_CMD:
-       case HDIO_SCAN_HWIF:
        /* 0x330 is reserved -- it used to be HDIO_GETGEO_BIG */
        case 0x330:
        /* 0x02 -- Floppy ioctls */
@@ -789,6 +788,7 @@ long compat_blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg)
                return compat_hdio_getgeo(disk, bdev, compat_ptr(arg));
        case BLKFLSBUF:
        case BLKROSET:
+       case BLKDISCARD:
        /*
         * the ones below are implemented in blkdev_locked_ioctl,
         * but we call blkdev_ioctl, which gets the lock for us