diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2008-03-02 10:37:41 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-10-21 07:48:42 -0400 |
commit | 46d74326e660b2878005d222fb3efbc4eaa1ea4a (patch) | |
tree | 2700cc34d9b72e1b5554f039fa583f7aefc72a34 /drivers/s390 | |
parent | 57a7c0bca009059d1d85bec608af70aa6c5f344c (diff) |
[PATCH] switch dcssblk
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/s390')
-rw-r--r-- | drivers/s390/block/dcssblk.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c index 413460cc3dd8..63f26a135fe5 100644 --- a/drivers/s390/block/dcssblk.c +++ b/drivers/s390/block/dcssblk.c | |||
@@ -31,8 +31,8 @@ | |||
31 | #define PRINT_WARN(x...) printk(KERN_WARNING DCSSBLK_NAME " warning: " x) | 31 | #define PRINT_WARN(x...) printk(KERN_WARNING DCSSBLK_NAME " warning: " x) |
32 | #define PRINT_ERR(x...) printk(KERN_ERR DCSSBLK_NAME " error: " x) | 32 | #define PRINT_ERR(x...) printk(KERN_ERR DCSSBLK_NAME " error: " x) |
33 | 33 | ||
34 | static int dcssblk_open(struct inode *inode, struct file *filp); | 34 | static int dcssblk_open(struct block_device *bdev, fmode_t mode); |
35 | static int dcssblk_release(struct inode *inode, struct file *filp); | 35 | static int dcssblk_release(struct gendisk *disk, fmode_t mode); |
36 | static int dcssblk_make_request(struct request_queue *q, struct bio *bio); | 36 | static int dcssblk_make_request(struct request_queue *q, struct bio *bio); |
37 | static int dcssblk_direct_access(struct block_device *bdev, sector_t secnum, | 37 | static int dcssblk_direct_access(struct block_device *bdev, sector_t secnum, |
38 | void **kaddr, unsigned long *pfn); | 38 | void **kaddr, unsigned long *pfn); |
@@ -42,8 +42,8 @@ static char dcssblk_segments[DCSSBLK_PARM_LEN] = "\0"; | |||
42 | static int dcssblk_major; | 42 | static int dcssblk_major; |
43 | static struct block_device_operations dcssblk_devops = { | 43 | static struct block_device_operations dcssblk_devops = { |
44 | .owner = THIS_MODULE, | 44 | .owner = THIS_MODULE, |
45 | .__open = dcssblk_open, | 45 | .open = dcssblk_open, |
46 | .__release = dcssblk_release, | 46 | .release = dcssblk_release, |
47 | .direct_access = dcssblk_direct_access, | 47 | .direct_access = dcssblk_direct_access, |
48 | }; | 48 | }; |
49 | 49 | ||
@@ -776,32 +776,31 @@ out_buf: | |||
776 | } | 776 | } |
777 | 777 | ||
778 | static int | 778 | static int |
779 | dcssblk_open(struct inode *inode, struct file *filp) | 779 | dcssblk_open(struct block_device *bdev, fmode_t mode) |
780 | { | 780 | { |
781 | struct dcssblk_dev_info *dev_info; | 781 | struct dcssblk_dev_info *dev_info; |
782 | int rc; | 782 | int rc; |
783 | 783 | ||
784 | dev_info = inode->i_bdev->bd_disk->private_data; | 784 | dev_info = bdev->bd_disk->private_data; |
785 | if (NULL == dev_info) { | 785 | if (NULL == dev_info) { |
786 | rc = -ENODEV; | 786 | rc = -ENODEV; |
787 | goto out; | 787 | goto out; |
788 | } | 788 | } |
789 | atomic_inc(&dev_info->use_count); | 789 | atomic_inc(&dev_info->use_count); |
790 | inode->i_bdev->bd_block_size = 4096; | 790 | bdev->bd_block_size = 4096; |
791 | rc = 0; | 791 | rc = 0; |
792 | out: | 792 | out: |
793 | return rc; | 793 | return rc; |
794 | } | 794 | } |
795 | 795 | ||
796 | static int | 796 | static int |
797 | dcssblk_release(struct inode *inode, struct file *filp) | 797 | dcssblk_release(struct gendisk *disk, fmode_t mode) |
798 | { | 798 | { |
799 | struct dcssblk_dev_info *dev_info; | 799 | struct dcssblk_dev_info *dev_info = disk->private_data; |
800 | struct segment_info *entry; | 800 | struct segment_info *entry; |
801 | int rc; | 801 | int rc; |
802 | 802 | ||
803 | dev_info = inode->i_bdev->bd_disk->private_data; | 803 | if (!dev_info) { |
804 | if (NULL == dev_info) { | ||
805 | rc = -ENODEV; | 804 | rc = -ENODEV; |
806 | goto out; | 805 | goto out; |
807 | } | 806 | } |