aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/char/tape_block.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-23 13:23:07 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-23 13:23:07 -0400
commit22484856402bfa1ff3defe47f6029ab0418240d9 (patch)
tree140c67bf59674da350a7b51765d6ff7eb101b597 /drivers/s390/char/tape_block.c
parent5ed487bc2c44ca4e9668ef9cb54c830e2a9fac47 (diff)
parent56b26add02b4bdea81d5e0ebda60db1fe3311ad4 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/viro/bdev
* git://git.kernel.org/pub/scm/linux/kernel/git/viro/bdev: (66 commits) [PATCH] kill the rest of struct file propagation in block ioctls [PATCH] get rid of struct file use in blkdev_ioctl() BLKBSZSET [PATCH] get rid of blkdev_locked_ioctl() [PATCH] get rid of blkdev_driver_ioctl() [PATCH] sanitize blkdev_get() and friends [PATCH] remember mode of reiserfs journal [PATCH] propagate mode through swsusp_close() [PATCH] propagate mode through open_bdev_excl/close_bdev_excl [PATCH] pass fmode_t to blkdev_put() [PATCH] kill the unused bsize on the send side of /dev/loop [PATCH] trim file propagation in block/compat_ioctl.c [PATCH] end of methods switch: remove the old ones [PATCH] switch sr [PATCH] switch sd [PATCH] switch ide-scsi [PATCH] switch tape_block [PATCH] switch dcssblk [PATCH] switch dasd [PATCH] switch mtd_blkdevs [PATCH] switch mmc ...
Diffstat (limited to 'drivers/s390/char/tape_block.c')
-rw-r--r--drivers/s390/char/tape_block.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/drivers/s390/char/tape_block.c b/drivers/s390/char/tape_block.c
index a25b8bf54f41..023803dbb0c7 100644
--- a/drivers/s390/char/tape_block.c
+++ b/drivers/s390/char/tape_block.c
@@ -43,9 +43,9 @@
43/* 43/*
44 * file operation structure for tape block frontend 44 * file operation structure for tape block frontend
45 */ 45 */
46static int tapeblock_open(struct inode *, struct file *); 46static int tapeblock_open(struct block_device *, fmode_t);
47static int tapeblock_release(struct inode *, struct file *); 47static int tapeblock_release(struct gendisk *, fmode_t);
48static int tapeblock_ioctl(struct inode *, struct file *, unsigned int, 48static int tapeblock_ioctl(struct block_device *, fmode_t, unsigned int,
49 unsigned long); 49 unsigned long);
50static int tapeblock_medium_changed(struct gendisk *); 50static int tapeblock_medium_changed(struct gendisk *);
51static int tapeblock_revalidate_disk(struct gendisk *); 51static int tapeblock_revalidate_disk(struct gendisk *);
@@ -54,7 +54,7 @@ static struct block_device_operations tapeblock_fops = {
54 .owner = THIS_MODULE, 54 .owner = THIS_MODULE,
55 .open = tapeblock_open, 55 .open = tapeblock_open,
56 .release = tapeblock_release, 56 .release = tapeblock_release,
57 .ioctl = tapeblock_ioctl, 57 .locked_ioctl = tapeblock_ioctl,
58 .media_changed = tapeblock_medium_changed, 58 .media_changed = tapeblock_medium_changed,
59 .revalidate_disk = tapeblock_revalidate_disk, 59 .revalidate_disk = tapeblock_revalidate_disk,
60}; 60};
@@ -364,13 +364,12 @@ tapeblock_medium_changed(struct gendisk *disk)
364 * Block frontend tape device open function. 364 * Block frontend tape device open function.
365 */ 365 */
366static int 366static int
367tapeblock_open(struct inode *inode, struct file *filp) 367tapeblock_open(struct block_device *bdev, fmode_t mode)
368{ 368{
369 struct gendisk * disk; 369 struct gendisk * disk = bdev->bd_disk;
370 struct tape_device * device; 370 struct tape_device * device;
371 int rc; 371 int rc;
372 372
373 disk = inode->i_bdev->bd_disk;
374 device = tape_get_device_reference(disk->private_data); 373 device = tape_get_device_reference(disk->private_data);
375 374
376 if (device->required_tapemarks) { 375 if (device->required_tapemarks) {
@@ -410,9 +409,8 @@ release:
410 * we just get the pointer here and release the reference. 409 * we just get the pointer here and release the reference.
411 */ 410 */
412static int 411static int
413tapeblock_release(struct inode *inode, struct file *filp) 412tapeblock_release(struct gendisk *disk, fmode_t mode)
414{ 413{
415 struct gendisk *disk = inode->i_bdev->bd_disk;
416 struct tape_device *device = disk->private_data; 414 struct tape_device *device = disk->private_data;
417 415
418 tape_state_set(device, TS_IN_USE); 416 tape_state_set(device, TS_IN_USE);
@@ -427,22 +425,21 @@ tapeblock_release(struct inode *inode, struct file *filp)
427 */ 425 */
428static int 426static int
429tapeblock_ioctl( 427tapeblock_ioctl(
430 struct inode * inode, 428 struct block_device * bdev,
431 struct file * file, 429 fmode_t mode,
432 unsigned int command, 430 unsigned int command,
433 unsigned long arg 431 unsigned long arg
434) { 432) {
435 int rc; 433 int rc;
436 int minor; 434 int minor;
437 struct gendisk *disk; 435 struct gendisk *disk = bdev->bd_disk;
438 struct tape_device *device; 436 struct tape_device *device;
439 437
440 rc = 0; 438 rc = 0;
441 disk = inode->i_bdev->bd_disk;
442 BUG_ON(!disk); 439 BUG_ON(!disk);
443 device = disk->private_data; 440 device = disk->private_data;
444 BUG_ON(!device); 441 BUG_ON(!device);
445 minor = iminor(inode); 442 minor = MINOR(bdev->bd_dev);
446 443
447 DBF_LH(6, "tapeblock_ioctl(0x%0x)\n", command); 444 DBF_LH(6, "tapeblock_ioctl(0x%0x)\n", command);
448 DBF_LH(6, "device = %d:%d\n", tapeblock_major, minor); 445 DBF_LH(6, "device = %d:%d\n", tapeblock_major, minor);