diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-23 13:23:07 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-23 13:23:07 -0400 |
commit | 22484856402bfa1ff3defe47f6029ab0418240d9 (patch) | |
tree | 140c67bf59674da350a7b51765d6ff7eb101b597 /drivers/s390/char/tape_block.c | |
parent | 5ed487bc2c44ca4e9668ef9cb54c830e2a9fac47 (diff) | |
parent | 56b26add02b4bdea81d5e0ebda60db1fe3311ad4 (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.c | 25 |
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 | */ |
46 | static int tapeblock_open(struct inode *, struct file *); | 46 | static int tapeblock_open(struct block_device *, fmode_t); |
47 | static int tapeblock_release(struct inode *, struct file *); | 47 | static int tapeblock_release(struct gendisk *, fmode_t); |
48 | static int tapeblock_ioctl(struct inode *, struct file *, unsigned int, | 48 | static int tapeblock_ioctl(struct block_device *, fmode_t, unsigned int, |
49 | unsigned long); | 49 | unsigned long); |
50 | static int tapeblock_medium_changed(struct gendisk *); | 50 | static int tapeblock_medium_changed(struct gendisk *); |
51 | static int tapeblock_revalidate_disk(struct gendisk *); | 51 | static 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 | */ |
366 | static int | 366 | static int |
367 | tapeblock_open(struct inode *inode, struct file *filp) | 367 | tapeblock_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 | */ |
412 | static int | 411 | static int |
413 | tapeblock_release(struct inode *inode, struct file *filp) | 412 | tapeblock_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 | */ |
428 | static int | 426 | static int |
429 | tapeblock_ioctl( | 427 | tapeblock_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); |