aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/drivers
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 /arch/um/drivers
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 'arch/um/drivers')
-rw-r--r--arch/um/drivers/ubd_kern.c19
1 files changed, 9 insertions, 10 deletions
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index b58fb8941d8d..0a868118cf06 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -98,9 +98,9 @@ static inline void ubd_set_bit(__u64 bit, unsigned char *data)
98 98
99static DEFINE_MUTEX(ubd_lock); 99static DEFINE_MUTEX(ubd_lock);
100 100
101static int ubd_open(struct inode * inode, struct file * filp); 101static int ubd_open(struct block_device *bdev, fmode_t mode);
102static int ubd_release(struct inode * inode, struct file * file); 102static int ubd_release(struct gendisk *disk, fmode_t mode);
103static int ubd_ioctl(struct inode * inode, struct file * file, 103static int ubd_ioctl(struct block_device *bdev, fmode_t mode,
104 unsigned int cmd, unsigned long arg); 104 unsigned int cmd, unsigned long arg);
105static int ubd_getgeo(struct block_device *bdev, struct hd_geometry *geo); 105static int ubd_getgeo(struct block_device *bdev, struct hd_geometry *geo);
106 106
@@ -1112,9 +1112,9 @@ static int __init ubd_driver_init(void){
1112 1112
1113device_initcall(ubd_driver_init); 1113device_initcall(ubd_driver_init);
1114 1114
1115static int ubd_open(struct inode *inode, struct file *filp) 1115static int ubd_open(struct block_device *bdev, fmode_t mode)
1116{ 1116{
1117 struct gendisk *disk = inode->i_bdev->bd_disk; 1117 struct gendisk *disk = bdev->bd_disk;
1118 struct ubd *ubd_dev = disk->private_data; 1118 struct ubd *ubd_dev = disk->private_data;
1119 int err = 0; 1119 int err = 0;
1120 1120
@@ -1131,7 +1131,7 @@ static int ubd_open(struct inode *inode, struct file *filp)
1131 1131
1132 /* This should no more be needed. And it didn't work anyway to exclude 1132 /* This should no more be needed. And it didn't work anyway to exclude
1133 * read-write remounting of filesystems.*/ 1133 * read-write remounting of filesystems.*/
1134 /*if((filp->f_mode & FMODE_WRITE) && !ubd_dev->openflags.w){ 1134 /*if((mode & FMODE_WRITE) && !ubd_dev->openflags.w){
1135 if(--ubd_dev->count == 0) ubd_close_dev(ubd_dev); 1135 if(--ubd_dev->count == 0) ubd_close_dev(ubd_dev);
1136 err = -EROFS; 1136 err = -EROFS;
1137 }*/ 1137 }*/
@@ -1139,9 +1139,8 @@ static int ubd_open(struct inode *inode, struct file *filp)
1139 return err; 1139 return err;
1140} 1140}
1141 1141
1142static int ubd_release(struct inode * inode, struct file * file) 1142static int ubd_release(struct gendisk *disk, fmode_t mode)
1143{ 1143{
1144 struct gendisk *disk = inode->i_bdev->bd_disk;
1145 struct ubd *ubd_dev = disk->private_data; 1144 struct ubd *ubd_dev = disk->private_data;
1146 1145
1147 if(--ubd_dev->count == 0) 1146 if(--ubd_dev->count == 0)
@@ -1306,10 +1305,10 @@ static int ubd_getgeo(struct block_device *bdev, struct hd_geometry *geo)
1306 return 0; 1305 return 0;
1307} 1306}
1308 1307
1309static int ubd_ioctl(struct inode * inode, struct file * file, 1308static int ubd_ioctl(struct block_device *bdev, fmode_t mode,
1310 unsigned int cmd, unsigned long arg) 1309 unsigned int cmd, unsigned long arg)
1311{ 1310{
1312 struct ubd *ubd_dev = inode->i_bdev->bd_disk->private_data; 1311 struct ubd *ubd_dev = bdev->bd_disk->private_data;
1313 struct hd_driveid ubd_id = { 1312 struct hd_driveid ubd_id = {
1314 .cyls = 0, 1313 .cyls = 0,
1315 .heads = 128, 1314 .heads = 128,