]> git.hungrycats.org Git - linux/commitdiff
[PATCH] fix ide-tape oops
authorBartlomiej Zolnierkiewicz <b.zolnierkiewicz@elka.pw.edu.pl>
Tue, 4 Nov 2003 00:01:16 +0000 (16:01 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Tue, 4 Nov 2003 00:01:16 +0000 (16:01 -0800)
Set filp->private_data in idetape_chrdev_open() to point to a opened drive,
otherwise driver oopses during future access to tape character device.

Thanks to Stef van der Made <svdmade@planet.nl> for testing ide-tape fixes.

drivers/ide/ide-tape.c

index 6c8c067df5a759a7d125121037d9e32cff23365e..115811404886b7a79b641deca1dec7f85951205e 100644 (file)
@@ -5581,6 +5581,7 @@ static int idetape_chrdev_open (struct inode *inode, struct file *filp)
                return -ENXIO;
        drive = idetape_chrdevs[i].drive;
        tape = drive->driver_data;
+       filp->private_data = drive;
 
        if (test_and_set_bit(IDETAPE_BUSY, &tape->flags))
                return -EBUSY;