diff -urN B5-cdrom_ioctl/arch/um/drivers/ubd_kern.c B5-current/arch/um/drivers/ubd_kern.c --- B5-cdrom_ioctl/arch/um/drivers/ubd_kern.c Fri Sep 26 22:00:35 2003 +++ B5-current/arch/um/drivers/ubd_kern.c Sat Sep 27 00:16:51 2003 @@ -51,7 +51,7 @@ static int ubd_open(struct inode * inode, struct file * filp); static int ubd_release(struct inode * inode, struct file * file); -static int ubd_ioctl(struct inode * inode, struct file * file, +static int ubd_ioctl(struct block_device *bdev, struct file * file, unsigned int cmd, unsigned long arg); #define MAX_DEV (8) @@ -865,11 +865,11 @@ } } -static int ubd_ioctl(struct inode * inode, struct file * file, +static int ubd_ioctl(struct block_device *bdev, struct file * file, unsigned int cmd, unsigned long arg) { struct hd_geometry *loc = (struct hd_geometry *) arg; - struct ubd *dev = inode->i_bdev->bd_disk->private_data; + struct ubd *dev = bdev->bd_disk->private_data; int err; struct hd_driveid ubd_id = { .cyls = 0, @@ -890,7 +890,7 @@ case HDIO_SET_UNMASKINTR: if(!capable(CAP_SYS_ADMIN)) return(-EACCES); - if((arg > 1) || (inode->i_bdev->bd_contains != inode->i_bdev)) + if((arg > 1) || (bdev->bd_contains != bdev)) return(-EINVAL); return(0); @@ -910,7 +910,7 @@ case HDIO_SET_MULTCOUNT: if(!capable(CAP_SYS_ADMIN)) return(-EACCES); - if(inode->i_bdev->bd_contains != inode->i_bdev) + if(bdev->bd_contains != bdev) return(-EINVAL); return(0); diff -urN B5-cdrom_ioctl/drivers/acorn/block/fd1772.c B5-current/drivers/acorn/block/fd1772.c --- B5-cdrom_ioctl/drivers/acorn/block/fd1772.c Fri Sep 26 22:00:35 2003 +++ B5-current/drivers/acorn/block/fd1772.c Sat Sep 27 00:16:51 2003 @@ -365,7 +365,7 @@ static void floppy_off(unsigned int nr); static void setup_req_params(int drive); static void redo_fd_request(void); -static int fd_ioctl(struct inode *inode, struct file *filp, unsigned int +static int fd_ioctl(struct block_device *bdev, struct file *filp, unsigned int cmd, unsigned long param); static void fd_probe(int drive); static int fd_test_drive_present(int drive); @@ -1309,11 +1309,9 @@ return 0; } -static int fd_ioctl(struct inode *inode, struct file *filp, +static int fd_ioctl(struct block_device *bdev, struct file *filp, unsigned int cmd, unsigned long param) { - struct block_device *bdev = inode->i_bdev; - switch (cmd) { case FDFMTEND: case FDFLUSH: diff -urN B5-cdrom_ioctl/drivers/acorn/block/mfmhd.c B5-current/drivers/acorn/block/mfmhd.c --- B5-cdrom_ioctl/drivers/acorn/block/mfmhd.c Fri Sep 26 22:00:35 2003 +++ B5-current/drivers/acorn/block/mfmhd.c Sat Sep 27 00:16:51 2003 @@ -1153,9 +1153,9 @@ * The 'front' end of the mfm driver follows... */ -static int mfm_ioctl(struct inode *inode, struct file *file, u_int cmd, u_long arg) +static int mfm_ioctl(struct block_device *bdev, struct file *file, u_int cmd, u_long arg) { - struct mfm_info *p = inode->i_bdev->bd_disk->private_data; + struct mfm_info *p = bdev->bd_disk->private_data; struct hd_geometry *geo = (struct hd_geometry *) arg; if (cmd != HDIO_GETGEO) return -EINVAL; @@ -1167,7 +1167,7 @@ return -EFAULT; if (put_user (p->cylinders, &geo->cylinders)) return -EFAULT; - if (put_user (get_start_sect(inode->i_bdev), &geo->start)) + if (put_user (get_start_sect(bdev), &geo->start)) return -EFAULT; return 0; } diff -urN B5-cdrom_ioctl/drivers/block/DAC960.c B5-current/drivers/block/DAC960.c --- B5-cdrom_ioctl/drivers/block/DAC960.c Fri Sep 26 22:00:35 2003 +++ B5-current/drivers/block/DAC960.c Sat Sep 27 00:16:51 2003 @@ -91,10 +91,10 @@ return 0; } -static int DAC960_ioctl(struct inode *inode, struct file *file, +static int DAC960_ioctl(struct block_device *bdev, struct file *file, unsigned int cmd, unsigned long arg) { - struct gendisk *disk = inode->i_bdev->bd_disk; + struct gendisk *disk = bdev->bd_disk; DAC960_Controller_T *p = disk->queue->queuedata; int drive_nr = (int)disk->private_data; struct hd_geometry g, *loc = (struct hd_geometry *)arg; @@ -128,7 +128,7 @@ g.cylinders = i->ConfigurableDeviceSize / (g.heads * g.sectors); } - g.start = get_start_sect(inode->i_bdev); + g.start = get_start_sect(bdev); return copy_to_user(loc, &g, sizeof g) ? -EFAULT : 0; } diff -urN B5-cdrom_ioctl/drivers/block/acsi.c B5-current/drivers/block/acsi.c --- B5-cdrom_ioctl/drivers/block/acsi.c Fri Sep 26 22:00:35 2003 +++ B5-current/drivers/block/acsi.c Sat Sep 27 00:16:51 2003 @@ -358,7 +358,7 @@ static void do_end_requests( void ); static void do_acsi_request( request_queue_t * ); static void redo_acsi_request( void ); -static int acsi_ioctl( struct inode *inode, struct file *file, unsigned int +static int acsi_ioctl(struct block_device *bdev, struct file *file, unsigned int cmd, unsigned long arg ); static int acsi_open( struct inode * inode, struct file * filp ); static int acsi_release( struct inode * inode, struct file * file ); @@ -1080,10 +1080,10 @@ ***********************************************************************/ -static int acsi_ioctl( struct inode *inode, struct file *file, - unsigned int cmd, unsigned long arg ) +static int acsi_ioctl(struct block_device *bdev, struct file *file, + unsigned int cmd, unsigned long arg ) { - struct gendisk *disk = inode->i_bdev->bd_disk; + struct gendisk *disk = bdev->bd_disk; struct acsi_info_struct *aip = disk->private_data; switch (cmd) { case HDIO_GETGEO: @@ -1095,7 +1095,7 @@ put_user( 64, &geo->heads ); put_user( 32, &geo->sectors ); put_user( aip->size >> 11, &geo->cylinders ); - put_user(get_start_sect(inode->i_bdev), &geo->start); + put_user(get_start_sect(bdev), &geo->start); return 0; } case SCSI_IOCTL_GET_IDLUN: diff -urN B5-cdrom_ioctl/drivers/block/amiflop.c B5-current/drivers/block/amiflop.c --- B5-cdrom_ioctl/drivers/block/amiflop.c Fri Sep 26 22:00:35 2003 +++ B5-current/drivers/block/amiflop.c Sat Sep 27 00:16:51 2003 @@ -1434,10 +1434,9 @@ redo_fd_request(); } -static int fd_ioctl(struct inode *inode, struct file *filp, +static int fd_ioctl(struct block_device *bdev, struct file *filp, unsigned int cmd, unsigned long param) { - struct block_device *bdev = inode->i_bdev; struct amiga_floppy_struct *floppy = bdev->bd_disk->private_data; int drive = floppy - unit; static struct floppy_struct getprm; diff -urN B5-cdrom_ioctl/drivers/block/ataflop.c B5-current/drivers/block/ataflop.c --- B5-cdrom_ioctl/drivers/block/ataflop.c Fri Sep 26 22:00:35 2003 +++ B5-current/drivers/block/ataflop.c Sat Sep 27 00:16:51 2003 @@ -364,7 +364,7 @@ static __inline__ void copy_buffer( void *from, void *to); static void setup_req_params( int drive ); static void redo_fd_request( void); -static int fd_ioctl( struct inode *inode, struct file *filp, unsigned int +static int fd_ioctl(struct block_device *bdev, struct file *filp, unsigned int cmd, unsigned long param); static void fd_probe( int drive ); static int fd_test_drive_present( int drive ); @@ -1496,10 +1496,10 @@ atari_enable_irq( IRQ_MFP_FDC ); } -static int fd_ioctl(struct inode *inode, struct file *filp, +static int fd_ioctl(struct block_device *bdev, struct file *filp, unsigned int cmd, unsigned long param) { - struct gendisk *disk = inode->i_bdev->bd_disk; + struct gendisk *disk = bdev->bd_disk; struct atari_floppy_struct *floppy = disk->private_data; int drive = floppy - unit; int type = floppy->type; @@ -1673,7 +1673,7 @@ /* invalidate the buffer track to force a reread */ BufferDrive = -1; set_bit(drive, &fake_change); - check_disk_change(inode->i_bdev); + check_disk_change(bdev); return 0; default: return -EINVAL; diff -urN B5-cdrom_ioctl/drivers/block/cciss.c B5-current/drivers/block/cciss.c --- B5-cdrom_ioctl/drivers/block/cciss.c Mon Sep 8 19:25:05 2003 +++ B5-current/drivers/block/cciss.c Sat Sep 27 00:17:35 2003 @@ -116,7 +116,7 @@ static void do_cciss_request(request_queue_t *q); static int cciss_open(struct inode *inode, struct file *filep); static int cciss_release(struct inode *inode, struct file *filep); -static int cciss_ioctl(struct inode *inode, struct file *filep, +static int cciss_ioctl(struct block_device *bdev, struct file *filep, unsigned int cmd, unsigned long arg); static int revalidate_allvol(ctlr_info_t *host); @@ -408,10 +408,9 @@ /* * ioctl */ -static int cciss_ioctl(struct inode *inode, struct file *filep, +static int cciss_ioctl(struct block_device *bdev, struct file *filep, unsigned int cmd, unsigned long arg) { - struct block_device *bdev = inode->i_bdev; struct gendisk *disk = bdev->bd_disk; ctlr_info_t *host = get_host(disk); drive_info_struct *drv = get_drv(disk); @@ -434,7 +433,7 @@ driver_geo.sectors = 0x3f; driver_geo.cylinders = (int)drv->nr_blocks / (0xff*0x3f); } - driver_geo.start= get_start_sect(inode->i_bdev); + driver_geo.start= get_start_sect(bdev); if (copy_to_user((void *) arg, &driver_geo, sizeof( struct hd_geometry))) return -EFAULT; diff -urN B5-cdrom_ioctl/drivers/block/cpqarray.c B5-current/drivers/block/cpqarray.c --- B5-cdrom_ioctl/drivers/block/cpqarray.c Mon Sep 8 19:25:05 2003 +++ B5-current/drivers/block/cpqarray.c Sat Sep 27 00:19:15 2003 @@ -132,7 +132,7 @@ static int ida_open(struct inode *inode, struct file *filep); static int ida_release(struct inode *inode, struct file *filep); -static int ida_ioctl(struct inode *inode, struct file *filep, unsigned int cmd, unsigned long arg); +static int ida_ioctl(struct block_device *bdev, struct file *filep, unsigned int cmd, unsigned long arg); static int ida_ctlr_ioctl(ctlr_info_t *h, int dsk, ida_ioctl_t *io); static void do_ida_request(request_queue_t *q); @@ -1024,10 +1024,10 @@ * ida_ioctl does some miscellaneous stuff like reporting drive geometry, * setting readahead and submitting commands from userspace to the controller. */ -static int ida_ioctl(struct inode *inode, struct file *filep, unsigned int cmd, unsigned long arg) +static int ida_ioctl(struct block_device *bdev, struct file *filep, unsigned int cmd, unsigned long arg) { - drv_info_t *drv = get_drv(inode->i_bdev->bd_disk); - ctlr_info_t *host = get_host(inode->i_bdev->bd_disk); + drv_info_t *drv = get_drv(bdev->bd_disk); + ctlr_info_t *host = get_host(bdev->bd_disk); int error; int diskinfo[4]; struct hd_geometry *geo = (struct hd_geometry *)arg; @@ -1048,7 +1048,7 @@ put_user(diskinfo[0], &geo->heads); put_user(diskinfo[1], &geo->sectors); put_user(diskinfo[2], &geo->cylinders); - put_user(get_start_sect(inode->i_bdev), &geo->start); + put_user(get_start_sect(bdev), &geo->start); return 0; case IDAGETDRVINFO: if (copy_to_user(&io->c.drv, drv, sizeof(drv_info_t))) @@ -1078,7 +1078,7 @@ put_user(host->ctlr_sig, (int*)arg); return 0; case IDAREVALIDATEVOLS: - if (iminor(inode) != 0) + if (bdev != bdev->bd_contains || drv != host->drv) return -ENXIO; return revalidate_allvol(host); case IDADRIVERVERSION: diff -urN B5-cdrom_ioctl/drivers/block/floppy.c B5-current/drivers/block/floppy.c --- B5-cdrom_ioctl/drivers/block/floppy.c Mon Sep 8 19:25:05 2003 +++ B5-current/drivers/block/floppy.c Sat Sep 27 00:21:02 2003 @@ -3453,14 +3453,14 @@ return 0; } -static int fd_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, +static int fd_ioctl(struct block_device *bdev, struct file *filp, unsigned int cmd, unsigned long param) { #define FD_IOCTL_ALLOWED ((filp) && (filp)->private_data) #define OUT(c,x) case c: outparam = (const char *) (x); break #define IN(c,x,tag) case c: *(x) = inparam. tag ; return 0 - int drive = (long)inode->i_bdev->bd_disk->private_data; + int drive = (long)bdev->bd_disk->private_data; int i, type = ITYPE(UDRS->fd_device); int ret; int size; @@ -3536,11 +3536,11 @@ current_type[drive] = NULL; floppy_sizes[drive] = MAX_DISK_SIZE << 1; UDRS->keep_data = 0; - return invalidate_drive(inode->i_bdev); + return invalidate_drive(bdev); case FDSETPRM: case FDDEFPRM: return set_geometry(cmd, & inparam.g, - drive, type, inode->i_bdev); + drive, type, bdev); case FDGETPRM: ECALL(get_floppy_geometry(drive, type, (struct floppy_struct**) @@ -3571,7 +3571,7 @@ case FDFMTEND: case FDFLUSH: LOCK_FDC(drive,1); - return invalidate_drive(inode->i_bdev); + return invalidate_drive(bdev); case FDSETEMSGTRESH: UDP->max_errors.reporting = diff -urN B5-cdrom_ioctl/drivers/block/floppy98.c B5-current/drivers/block/floppy98.c --- B5-cdrom_ioctl/drivers/block/floppy98.c Mon Sep 8 19:25:05 2003 +++ B5-current/drivers/block/floppy98.c Sat Sep 27 00:25:12 2003 @@ -3484,14 +3484,14 @@ return 0; } -static int fd_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, +static int fd_ioctl(struct block_device *bdev, struct file *filp, unsigned int cmd, unsigned long param) { #define FD_IOCTL_ALLOWED ((filp) && (filp)->private_data) #define OUT(c,x) case c: outparam = (const char *) (x); break #define IN(c,x,tag) case c: *(x) = inparam. tag ; return 0 - int drive = (long)inode->i_bdev->bd_disk->private_data; + int drive = (long)bdev->bd_disk->private_data; int i, type = ITYPE(UDRS->fd_device); int ret; int size; @@ -3566,11 +3566,11 @@ current_type[drive] = NULL; floppy_sizes[drive] = MAX_DISK_SIZE << 1; UDRS->keep_data = 0; - return invalidate_drive(inode->i_bdev); + return invalidate_drive(bdev); case FDSETPRM: case FDDEFPRM: return set_geometry(cmd, & inparam.g, - drive, type, inode->i_bdev); + drive, type, bdev); case FDGETPRM: ECALL(get_floppy_geometry(drive, type, (struct floppy_struct**) @@ -3625,7 +3625,7 @@ case FDFMTEND: case FDFLUSH: LOCK_FDC(drive,1); - return invalidate_drive(inode->i_bdev); + return invalidate_drive(bdev); case FDSETEMSGTRESH: UDP->max_errors.reporting = diff -urN B5-cdrom_ioctl/drivers/block/ioctl.c B5-current/drivers/block/ioctl.c --- B5-cdrom_ioctl/drivers/block/ioctl.c Mon Sep 8 19:25:05 2003 +++ B5-current/drivers/block/ioctl.c Sat Sep 27 00:32:11 2003 @@ -194,7 +194,7 @@ if (!capable(CAP_SYS_ADMIN)) return -EACCES; if (disk->fops->ioctl) { - ret = disk->fops->ioctl(inode, file, cmd, arg); + ret = disk->fops->ioctl(bdev, file, cmd, arg); if (ret != -EINVAL) return ret; } @@ -203,7 +203,7 @@ return 0; case BLKROSET: if (disk->fops->ioctl) { - ret = disk->fops->ioctl(inode, file, cmd, arg); + ret = disk->fops->ioctl(bdev, file, cmd, arg); if (ret != -EINVAL) return ret; } @@ -215,7 +215,7 @@ return 0; default: if (disk->fops->ioctl) - return disk->fops->ioctl(inode, file, cmd, arg); + return disk->fops->ioctl(bdev, file, cmd, arg); } return -ENOTTY; } diff -urN B5-cdrom_ioctl/drivers/block/loop.c B5-current/drivers/block/loop.c --- B5-cdrom_ioctl/drivers/block/loop.c Fri Sep 26 22:00:35 2003 +++ B5-current/drivers/block/loop.c Sat Sep 27 00:16:51 2003 @@ -1056,19 +1056,19 @@ return err; } -static int lo_ioctl(struct inode * inode, struct file * file, +static int lo_ioctl(strict block_device *bdev, struct file *file, unsigned int cmd, unsigned long arg) { - struct loop_device *lo = inode->i_bdev->bd_disk->private_data; + struct loop_device *lo = bdev->bd_disk->private_data; int err; down(&lo->lo_ctl_mutex); switch (cmd) { case LOOP_SET_FD: - err = loop_set_fd(lo, file, inode->i_bdev, arg); + err = loop_set_fd(lo, file, bdev, arg); break; case LOOP_CLR_FD: - err = loop_clr_fd(lo, inode->i_bdev); + err = loop_clr_fd(lo, bdev); break; case LOOP_SET_STATUS: err = loop_set_status_old(lo, (struct loop_info *) arg); diff -urN B5-cdrom_ioctl/drivers/block/nbd.c B5-current/drivers/block/nbd.c --- B5-cdrom_ioctl/drivers/block/nbd.c Fri Aug 22 23:10:47 2003 +++ B5-current/drivers/block/nbd.c Sat Sep 27 00:22:09 2003 @@ -535,10 +535,10 @@ return; } -static int nbd_ioctl(struct inode *inode, struct file *file, +static int nbd_ioctl(struct block_device *bdev, struct file *file, unsigned int cmd, unsigned long arg) { - struct nbd_device *lo = inode->i_bdev->bd_disk->private_data; + struct nbd_device *lo = bdev->bd_disk->private_data; int error; struct request sreq ; @@ -593,7 +593,7 @@ error = -EINVAL; file = fget(arg); if (file) { - inode = file->f_dentry->d_inode; + struct inode *inode = file->f_dentry->d_inode; if (inode->i_sock) { lo->file = file; lo->sock = SOCKET_I(inode); @@ -606,20 +606,20 @@ case NBD_SET_BLKSIZE: lo->blksize = arg; lo->bytesize &= ~(lo->blksize-1); - inode->i_bdev->bd_inode->i_size = lo->bytesize; - set_blocksize(inode->i_bdev, lo->blksize); + bdev->bd_inode->i_size = lo->bytesize; + set_blocksize(bdev, lo->blksize); set_capacity(lo->disk, lo->bytesize >> 9); return 0; case NBD_SET_SIZE: lo->bytesize = arg & ~(lo->blksize-1); - inode->i_bdev->bd_inode->i_size = lo->bytesize; - set_blocksize(inode->i_bdev, lo->blksize); + bdev->bd_inode->i_size = lo->bytesize; + set_blocksize(bdev, lo->blksize); set_capacity(lo->disk, lo->bytesize >> 9); return 0; case NBD_SET_SIZE_BLOCKS: lo->bytesize = ((u64) arg) * lo->blksize; - inode->i_bdev->bd_inode->i_size = lo->bytesize; - set_blocksize(inode->i_bdev, lo->blksize); + bdev->bd_inode->i_size = lo->bytesize; + set_blocksize(bdev, lo->blksize); set_capacity(lo->disk, lo->bytesize >> 9); return 0; case NBD_DO_IT: @@ -664,11 +664,11 @@ case NBD_PRINT_DEBUG: #ifdef PARANOIA printk(KERN_INFO "%s: next = %p, prev = %p. Global: in %d, out %d\n", - inode->i_bdev->bd_disk->disk_name, lo->queue_head.next, + bdev->bd_disk->disk_name, lo->queue_head.next, lo->queue_head.prev, requests_in, requests_out); #else printk(KERN_INFO "%s: next = %p, prev = %p\n", - inode->i_bdev->bd_disk->disk_name, + bdev->bd_disk->disk_name, lo->queue_head.next, lo->queue_head.prev); #endif return 0; diff -urN B5-cdrom_ioctl/drivers/block/paride/pcd.c B5-current/drivers/block/paride/pcd.c --- B5-cdrom_ioctl/drivers/block/paride/pcd.c Fri Sep 26 22:00:29 2003 +++ B5-current/drivers/block/paride/pcd.c Sat Sep 27 00:16:51 2003 @@ -255,11 +255,11 @@ return cdrom_release(&cd->info, file); } -static int pcd_block_ioctl(struct inode *inode, struct file *file, +static int pcd_block_ioctl(struct block_device *bdev, struct file *file, unsigned cmd, unsigned long arg) { - struct pcd_unit *cd = inode->i_bdev->bd_disk->private_data; - return cdrom_ioctl(&cd->info, inode->i_bdev, cmd, arg); + struct pcd_unit *cd = bdev->bd_disk->private_data; + return cdrom_ioctl(&cd->info, bdev, cmd, arg); } static int pcd_block_media_changed(struct gendisk *disk) diff -urN B5-cdrom_ioctl/drivers/block/paride/pd.c B5-current/drivers/block/paride/pd.c --- B5-cdrom_ioctl/drivers/block/paride/pd.c Mon Sep 8 19:25:05 2003 +++ B5-current/drivers/block/paride/pd.c Sat Sep 27 00:16:51 2003 @@ -238,7 +238,7 @@ void pd_setup(char *str, int *ints); static int pd_open(struct inode *inode, struct file *file); static void do_pd_request(request_queue_t * q); -static int pd_ioctl(struct inode *inode, struct file *file, +static int pd_ioctl(struct block_device *bdev, struct file *file, unsigned int cmd, unsigned long arg); static int pd_release(struct inode *inode, struct file *file); static int pd_revalidate(struct gendisk *p); @@ -350,10 +350,10 @@ return 0; } -static int pd_ioctl(struct inode *inode, struct file *file, +static int pd_ioctl(struct block_device *bdev, struct file *file, unsigned int cmd, unsigned long arg) { - struct pd_unit *disk = inode->i_bdev->bd_disk->private_data; + struct pd_unit *disk = bdev->bd_disk->private_data; struct hd_geometry *geo = (struct hd_geometry *) arg; struct hd_geometry g; @@ -372,7 +372,7 @@ g.sectors = disk->sectors; g.cylinders = disk->cylinders; } - g.start = get_start_sect(inode->i_bdev); + g.start = get_start_sect(bdev); if (copy_to_user(geo, &g, sizeof(struct hd_geometry))) return -EFAULT; return 0; diff -urN B5-cdrom_ioctl/drivers/block/paride/pf.c B5-current/drivers/block/paride/pf.c --- B5-cdrom_ioctl/drivers/block/paride/pf.c Sat Aug 9 02:20:46 2003 +++ B5-current/drivers/block/paride/pf.c Sat Sep 27 00:16:51 2003 @@ -224,7 +224,7 @@ static int pf_open(struct inode *inode, struct file *file); static void do_pf_request(request_queue_t * q); -static int pf_ioctl(struct inode *inode, struct file *file, +static int pf_ioctl(struct block_device *bdev, struct file *file, unsigned int cmd, unsigned long arg); static int pf_release(struct inode *inode, struct file *file); @@ -334,9 +334,9 @@ return 0; } -static int pf_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) +static int pf_ioctl(struct block_device *bdev, struct file *file, unsigned int cmd, unsigned long arg) { - struct pf_unit *pf = inode->i_bdev->bd_disk->private_data; + struct pf_unit *pf = bdev->bd_disk->private_data; struct hd_geometry *geo = (struct hd_geometry *) arg; struct hd_geometry g; sector_t capacity; diff -urN B5-cdrom_ioctl/drivers/block/ps2esdi.c B5-current/drivers/block/ps2esdi.c --- B5-cdrom_ioctl/drivers/block/ps2esdi.c Sat Aug 9 02:20:46 2003 +++ B5-current/drivers/block/ps2esdi.c Sat Sep 27 00:16:51 2003 @@ -83,7 +83,7 @@ static void ps2esdi_normal_interrupt_handler(u_int); static void ps2esdi_initial_reset_int_handler(u_int); static void ps2esdi_geometry_int_handler(u_int); -static int ps2esdi_ioctl(struct inode *inode, struct file *file, +static int ps2esdi_ioctl(struct block_device *bdev, struct file *file, u_int cmd, u_long arg); static int ps2esdi_read_status_words(int num_words, int max_words, u_short * buffer); @@ -1057,10 +1057,10 @@ } -static int ps2esdi_ioctl(struct inode *inode, +static int ps2esdi_ioctl(struct block_device *bdev, struct file *file, u_int cmd, u_long arg) { - struct ps2esdi_i_struct *p = inode->i_bdev->bd_disk->private_data; + struct ps2esdi_i_struct *p = bdev->bd_disk->private_data; struct ps2esdi_geometry *geometry = (struct ps2esdi_geometry *) arg; int err; @@ -1071,7 +1071,7 @@ put_user(p->head, (char *) &geometry->heads); put_user(p->sect, (char *) &geometry->sectors); put_user(p->cyl, (short *) &geometry->cylinders); - put_user(get_start_sect(inode->i_bdev), (long *) &geometry->start); + put_user(get_start_sect(bdev), (long *) &geometry->start); return 0; } diff -urN B5-cdrom_ioctl/drivers/block/rd.c B5-current/drivers/block/rd.c --- B5-cdrom_ioctl/drivers/block/rd.c Mon Sep 8 19:25:05 2003 +++ B5-current/drivers/block/rd.c Sat Sep 27 00:22:30 2003 @@ -242,10 +242,9 @@ return 0; } -static int rd_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) +static int rd_ioctl(struct block_device *bdev, struct file *file, unsigned int cmd, unsigned long arg) { int error; - struct block_device *bdev = inode->i_bdev; if (cmd != BLKFLSBUF) return -EINVAL; diff -urN B5-cdrom_ioctl/drivers/block/swim3.c B5-current/drivers/block/swim3.c --- B5-cdrom_ioctl/drivers/block/swim3.c Sat Aug 9 02:20:46 2003 +++ B5-current/drivers/block/swim3.c Sat Sep 27 00:26:58 2003 @@ -239,7 +239,7 @@ int interruptible); static void release_drive(struct floppy_state *fs); static int fd_eject(struct floppy_state *fs); -static int floppy_ioctl(struct inode *inode, struct file *filp, +static int floppy_ioctl(struct block_device *bdev, struct file *filp, unsigned int cmd, unsigned long param); static int floppy_open(struct inode *inode, struct file *filp); static int floppy_release(struct inode *inode, struct file *filp); @@ -811,10 +811,10 @@ static struct floppy_struct floppy_type = { 2880,18,2,80,0,0x1B,0x00,0xCF,0x6C,NULL }; /* 7 1.44MB 3.5" */ -static int floppy_ioctl(struct inode *inode, struct file *filp, +static int floppy_ioctl(struct block_device *bdev, struct file *filp, unsigned int cmd, unsigned long param) { - struct floppy_state *fs = inode->i_bdev->bd_disk->private_data; + struct floppy_state *fs = bdev->bd_disk->private_data; int err; if ((cmd & 0x80) && !capable(CAP_SYS_ADMIN)) diff -urN B5-cdrom_ioctl/drivers/block/swim_iop.c B5-current/drivers/block/swim_iop.c --- B5-cdrom_ioctl/drivers/block/swim_iop.c Sat Aug 9 02:20:46 2003 +++ B5-current/drivers/block/swim_iop.c Sat Sep 27 00:26:32 2003 @@ -97,7 +97,7 @@ static void swimiop_status_update(int, struct swim_drvstatus *); static int swimiop_eject(struct floppy_state *fs); -static int floppy_ioctl(struct inode *inode, struct file *filp, +static int floppy_ioctl(struct block_device *bdev, struct file *filp, unsigned int cmd, unsigned long param); static int floppy_open(struct inode *inode, struct file *filp); static int floppy_release(struct inode *inode, struct file *filp); @@ -347,10 +347,10 @@ static struct floppy_struct floppy_type = { 2880,18,2,80,0,0x1B,0x00,0xCF,0x6C,NULL }; /* 7 1.44MB 3.5" */ -static int floppy_ioctl(struct inode *inode, struct file *filp, +static int floppy_ioctl(struct block_device *bdev, struct file *filp, unsigned int cmd, unsigned long param) { - struct floppy_state *fs = inode->i_bdev->bd_disk->private_data; + struct floppy_state *fs = bdev->bd_disk->private_data; int err; if ((cmd & 0x80) && !capable(CAP_SYS_ADMIN)) diff -urN B5-cdrom_ioctl/drivers/block/umem.c B5-current/drivers/block/umem.c --- B5-cdrom_ioctl/drivers/block/umem.c Sat Aug 9 02:20:46 2003 +++ B5-current/drivers/block/umem.c Sat Sep 27 00:26:01 2003 @@ -819,10 +819,10 @@ -- mm_ioctl ----------------------------------------------------------------------------------- */ -static int mm_ioctl(struct inode *i, struct file *f, unsigned int cmd, unsigned long arg) +static int mm_ioctl(struct block_device *bdev, struct file *f, unsigned int cmd, unsigned long arg) { if (cmd == HDIO_GETGEO) { - struct cardinfo *card = i->i_bdev->bd_disk->private_data; + struct cardinfo *card = bdev->bd_disk->private_data; int size = card->mm_size * (1024 / MM_HARDSECT); struct hd_geometry geo; /* @@ -832,7 +832,7 @@ */ geo.heads = 64; geo.sectors = 32; - geo.start = get_start_sect(i->i_bdev); + geo.start = get_start_sect(bdev); geo.cylinders = size / (geo.heads * geo.sectors); if (copy_to_user((void *) arg, &geo, sizeof(geo))) diff -urN B5-cdrom_ioctl/drivers/block/xd.c B5-current/drivers/block/xd.c --- B5-cdrom_ioctl/drivers/block/xd.c Mon Sep 8 19:25:05 2003 +++ B5-current/drivers/block/xd.c Sat Sep 27 00:25:33 2003 @@ -324,9 +324,9 @@ } /* xd_ioctl: handle device ioctl's */ -static int xd_ioctl (struct inode *inode,struct file *file,u_int cmd,u_long arg) +static int xd_ioctl (struct block_device *bdev,struct file *file,u_int cmd,u_long arg) { - XD_INFO *p = inode->i_bdev->bd_disk->private_data; + XD_INFO *p = bdev->bd_disk->private_data; switch (cmd) { case HDIO_GETGEO: @@ -336,7 +336,7 @@ g.heads = p->heads; g.sectors = p->sectors; g.cylinders = p->cylinders; - g.start = get_start_sect(inode->i_bdev); + g.start = get_start_sect(bdev); return copy_to_user(geometry, &g, sizeof g) ? -EFAULT : 0; } case HDIO_SET_DMA: diff -urN B5-cdrom_ioctl/drivers/block/xd.h B5-current/drivers/block/xd.h --- B5-cdrom_ioctl/drivers/block/xd.h Mon May 5 03:28:00 2003 +++ B5-current/drivers/block/xd.h Sat Sep 27 00:28:44 2003 @@ -105,7 +105,7 @@ static u_char xd_initdrives (void (*init_drive)(u_char drive)); static void do_xd_request (request_queue_t * q); -static int xd_ioctl (struct inode *inode,struct file *file,unsigned int cmd,unsigned long arg); +static int xd_ioctl (struct block_device *bdev,struct file *file,unsigned int cmd,unsigned long arg); static int xd_readwrite (u_char operation,XD_INFO *disk,char *buffer,u_int block,u_int count); static void xd_recalibrate (u_char drive); diff -urN B5-cdrom_ioctl/drivers/cdrom/aztcd.c B5-current/drivers/cdrom/aztcd.c --- B5-cdrom_ioctl/drivers/cdrom/aztcd.c Fri Sep 26 22:00:35 2003 +++ B5-current/drivers/cdrom/aztcd.c Sat Sep 27 00:16:51 2003 @@ -330,7 +330,7 @@ /* Kernel Interface Functions */ static int check_aztcd_media_change(struct gendisk *disk); -static int aztcd_ioctl(struct inode *ip, struct file *fp, unsigned int cmd, +static int aztcd_ioctl(struct block_device *bdev, struct file *fp, unsigned int cmd, unsigned long arg); static int aztcd_open(struct inode *ip, struct file *fp); static int aztcd_release(struct inode *inode, struct file *file); @@ -1153,7 +1153,7 @@ /* * Kernel IO-controls */ -static int aztcd_ioctl(struct inode *ip, struct file *fp, unsigned int cmd, +static int aztcd_ioctl(struct block_device *bdev, struct file *fp, unsigned int cmd, unsigned long arg) { int i; @@ -1171,8 +1171,6 @@ cmd, jiffies); printk("aztcd Status %x\n", getAztStatus()); #endif - if (!ip) - RETURNM("aztcd_ioctl 1", -EINVAL); if (getAztStatus() < 0) RETURNM("aztcd_ioctl 2", -EIO); if ((!aztTocUpToDate) || (aztDiskChanged)) { diff -urN B5-cdrom_ioctl/drivers/cdrom/cdu31a.c B5-current/drivers/cdrom/cdu31a.c --- B5-cdrom_ioctl/drivers/cdrom/cdu31a.c Fri Sep 26 22:00:29 2003 +++ B5-current/drivers/cdrom/cdu31a.c Sat Sep 27 00:16:51 2003 @@ -3177,10 +3177,10 @@ return cdrom_release(&scd_info, file); } -static int scd_block_ioctl(struct inode *inode, struct file *file, +static int scd_block_ioctl(struct block_device *bdev, struct file *file, unsigned cmd, unsigned long arg) { - return cdrom_ioctl(&scd_info, inode->i_bdev, cmd, arg); + return cdrom_ioctl(&scd_info, bdev, cmd, arg); } static int scd_block_media_changed(struct gendisk *disk) diff -urN B5-cdrom_ioctl/drivers/cdrom/cm206.c B5-current/drivers/cdrom/cm206.c --- B5-cdrom_ioctl/drivers/cdrom/cm206.c Fri Sep 26 22:00:29 2003 +++ B5-current/drivers/cdrom/cm206.c Sat Sep 27 00:16:51 2003 @@ -1360,10 +1360,10 @@ return cdrom_release(&cm206_info, file); } -static int cm206_block_ioctl(struct inode *inode, struct file *file, +static int cm206_block_ioctl(struct block_device *bdev, struct file *file, unsigned cmd, unsigned long arg) { - return cdrom_ioctl(&cm206_info, inode->i_bdev, cmd, arg); + return cdrom_ioctl(&cm206_info, bdev, cmd, arg); } static int cm206_block_media_changed(struct gendisk *disk) diff -urN B5-cdrom_ioctl/drivers/cdrom/gscd.c B5-current/drivers/cdrom/gscd.c --- B5-cdrom_ioctl/drivers/cdrom/gscd.c Mon Sep 8 19:25:05 2003 +++ B5-current/drivers/cdrom/gscd.c Sat Sep 27 00:16:51 2003 @@ -91,7 +91,7 @@ /* Schnittstellen zum Kern/FS */ static void __do_gscd_request(unsigned long dummy); -static int gscd_ioctl(struct inode *, struct file *, unsigned int, +static int gscd_ioctl(struct block_device *, struct file *, unsigned int, unsigned long); static int gscd_open(struct inode *, struct file *); static int gscd_release(struct inode *, struct file *); @@ -190,8 +190,8 @@ #endif -static int gscd_ioctl(struct inode *ip, struct file *fp, unsigned int cmd, - unsigned long arg) +static int gscd_ioctl(struct block_device *bdev, struct file *fp, + unsigned int cmd, unsigned long arg) { unsigned char to_do[10]; unsigned char dummy; diff -urN B5-cdrom_ioctl/drivers/cdrom/mcd.c B5-current/drivers/cdrom/mcd.c --- B5-cdrom_ioctl/drivers/cdrom/mcd.c Fri Sep 26 22:00:29 2003 +++ B5-current/drivers/cdrom/mcd.c Sat Sep 27 00:16:51 2003 @@ -224,10 +224,10 @@ return cdrom_release(&mcd_info, file); } -static int mcd_block_ioctl(struct inode *inode, struct file *file, +static int mcd_block_ioctl(struct struct block_device *bdev, struct file *file, unsigned cmd, unsigned long arg) { - return cdrom_ioctl(&mcd_info, inode->i_bdev, cmd, arg); + return cdrom_ioctl(&mcd_info, bdev, cmd, arg); } static int mcd_block_media_changed(struct gendisk *disk) diff -urN B5-cdrom_ioctl/drivers/cdrom/mcdx.c B5-current/drivers/cdrom/mcdx.c --- B5-cdrom_ioctl/drivers/cdrom/mcdx.c Fri Sep 26 22:00:29 2003 +++ B5-current/drivers/cdrom/mcdx.c Sat Sep 27 00:16:51 2003 @@ -233,11 +233,11 @@ return cdrom_release(&p->info, file); } -static int mcdx_block_ioctl(struct inode *inode, struct file *file, +static int mcdx_block_ioctl(struct block_device *bdev, struct file *file, unsigned cmd, unsigned long arg) { - struct s_drive_stuff *p = inode->i_bdev->bd_disk->private_data; - return cdrom_ioctl(&p->info, inode->i_bdev, cmd, arg); + struct s_drive_stuff *p = bdev->bd_disk->private_data; + return cdrom_ioctl(&p->info, bdev, cmd, arg); } static int mcdx_block_media_changed(struct gendisk *disk) diff -urN B5-cdrom_ioctl/drivers/cdrom/optcd.c B5-current/drivers/cdrom/optcd.c --- B5-cdrom_ioctl/drivers/cdrom/optcd.c Mon Sep 8 19:25:05 2003 +++ B5-current/drivers/cdrom/optcd.c Sat Sep 27 00:16:51 2003 @@ -1713,15 +1713,12 @@ /* VFS calls */ -static int opt_ioctl(struct inode *ip, struct file *fp, +static int opt_ioctl(struct block_device *bdev, struct file *fp, unsigned int cmd, unsigned long arg) { int status, err, retval = 0; DEBUG((DEBUG_VFS, "starting opt_ioctl")); - - if (!ip) - return -EINVAL; if (cmd == CDROMRESET) return cdromreset(); diff -urN B5-cdrom_ioctl/drivers/cdrom/sbpcd.c B5-current/drivers/cdrom/sbpcd.c --- B5-cdrom_ioctl/drivers/cdrom/sbpcd.c Fri Sep 26 22:00:29 2003 +++ B5-current/drivers/cdrom/sbpcd.c Sat Sep 27 00:16:51 2003 @@ -5369,11 +5369,11 @@ return cdrom_release(p->sbpcd_infop, file); } -static int sbpcd_block_ioctl(struct inode *inode, struct file *file, +static int sbpcd_block_ioctl(struct block_device *bdev, struct file *file, unsigned cmd, unsigned long arg) { - struct sbpcd_drive *p = inode->i_bdev->bd_disk->private_data; - return cdrom_ioctl(p->sbpcd_infop, inode->i_bdev, cmd, arg); + struct sbpcd_drive *p = bdev->bd_disk->private_data; + return cdrom_ioctl(p->sbpcd_infop, bdev, cmd, arg); } static int sbpcd_block_media_changed(struct gendisk *disk) diff -urN B5-cdrom_ioctl/drivers/cdrom/sjcd.c B5-current/drivers/cdrom/sjcd.c --- B5-cdrom_ioctl/drivers/cdrom/sjcd.c Mon Sep 8 19:25:05 2003 +++ B5-current/drivers/cdrom/sjcd.c Sat Sep 27 00:16:51 2003 @@ -713,15 +713,12 @@ /* * Do some user commands. */ -static int sjcd_ioctl(struct inode *ip, struct file *fp, +static int sjcd_ioctl(struct block_device *bdev, struct file *fp, unsigned int cmd, unsigned long arg) { #if defined( SJCD_TRACE ) printk("SJCD:ioctl\n"); #endif - - if (ip == NULL) - return (-EINVAL); sjcd_get_status(); if (!sjcd_status_valid) diff -urN B5-cdrom_ioctl/drivers/cdrom/sonycd535.c B5-current/drivers/cdrom/sonycd535.c --- B5-cdrom_ioctl/drivers/cdrom/sonycd535.c Mon Sep 8 19:25:05 2003 +++ B5-current/drivers/cdrom/sonycd535.c Sat Sep 27 00:16:51 2003 @@ -1051,7 +1051,7 @@ * The big ugly ioctl handler. */ static int -cdu_ioctl(struct inode *inode, +cdu_ioctl(struct block_device *bdev, struct file *file, unsigned int cmd, unsigned long arg) diff -urN B5-cdrom_ioctl/drivers/ide/ide-cd.c B5-current/drivers/ide/ide-cd.c --- B5-cdrom_ioctl/drivers/ide/ide-cd.c Fri Sep 26 22:00:29 2003 +++ B5-current/drivers/ide/ide-cd.c Sat Sep 27 00:16:51 2003 @@ -3355,15 +3355,14 @@ return 0; } -static int idecd_ioctl (struct inode *inode, struct file *file, +static int idecd_ioctl (struct block_device *bdev, struct file *file, unsigned int cmd, unsigned long arg) { - struct block_device *bdev = inode->i_bdev; ide_drive_t *drive = bdev->bd_disk->private_data; int err = generic_ide_ioctl(bdev, cmd, arg); if (err == -EINVAL) { struct cdrom_info *info = drive->driver_data; - err = cdrom_ioctl(&info->devinfo, inode->i_bdev, cmd, arg); + err = cdrom_ioctl(&info->devinfo, bdev, cmd, arg); } return err; } diff -urN B5-cdrom_ioctl/drivers/ide/ide-disk.c B5-current/drivers/ide/ide-disk.c --- B5-cdrom_ioctl/drivers/ide/ide-disk.c Mon Sep 8 19:25:11 2003 +++ B5-current/drivers/ide/ide-disk.c Sat Sep 27 00:16:51 2003 @@ -1798,10 +1798,9 @@ return 0; } -static int idedisk_ioctl(struct inode *inode, struct file *file, +static int idedisk_ioctl(struct block_device *bdev, struct file *file, unsigned int cmd, unsigned long arg) { - struct block_device *bdev = inode->i_bdev; return generic_ide_ioctl(bdev, cmd, arg); } diff -urN B5-cdrom_ioctl/drivers/ide/ide-floppy.c B5-current/drivers/ide/ide-floppy.c --- B5-cdrom_ioctl/drivers/ide/ide-floppy.c Mon Sep 8 19:25:11 2003 +++ B5-current/drivers/ide/ide-floppy.c Sat Sep 27 00:16:51 2003 @@ -1936,10 +1936,9 @@ return 0; } -static int idefloppy_ioctl(struct inode *inode, struct file *file, +static int idefloppy_ioctl(struct block_device *bdev, struct file *file, unsigned int cmd, unsigned long arg) { - struct block_device *bdev = inode->i_bdev; ide_drive_t *drive = bdev->bd_disk->private_data; idefloppy_floppy_t *floppy = drive->driver_data; int err = generic_ide_ioctl(bdev, cmd, arg); diff -urN B5-cdrom_ioctl/drivers/ide/ide-tape.c B5-current/drivers/ide/ide-tape.c --- B5-cdrom_ioctl/drivers/ide/ide-tape.c Mon Sep 8 19:25:11 2003 +++ B5-current/drivers/ide/ide-tape.c Sat Sep 27 00:16:51 2003 @@ -6352,10 +6352,9 @@ return 0; } -static int idetape_ioctl(struct inode *inode, struct file *file, +static int idetape_ioctl(struct block_device *bdev, struct file *file, unsigned int cmd, unsigned long arg) { - struct block_device *bdev = inode->i_bdev; ide_drive_t *drive = bdev->bd_disk->private_data; int err = generic_ide_ioctl(bdev, cmd, arg); if (err == -EINVAL) diff -urN B5-cdrom_ioctl/drivers/ide/legacy/hd.c B5-current/drivers/ide/legacy/hd.c --- B5-cdrom_ioctl/drivers/ide/legacy/hd.c Fri Aug 22 23:10:47 2003 +++ B5-current/drivers/ide/legacy/hd.c Sat Sep 27 00:16:51 2003 @@ -656,10 +656,10 @@ enable_irq(HD_IRQ); } -static int hd_ioctl(struct inode * inode, struct file * file, +static int hd_ioctl(struct block_device *bdev, struct file *file, unsigned int cmd, unsigned long arg) { - struct hd_i_struct *disk = inode->i_bdev->bd_disk->private_data; + struct hd_i_struct *disk = bdev->bd_disk->private_data; struct hd_geometry *loc = (struct hd_geometry *) arg; struct hd_geometry g; @@ -670,7 +670,7 @@ g.heads = disk->head; g.sectors = disk->sect; g.cylinders = disk->cyl; - g.start = get_start_sect(inode->i_bdev); + g.start = get_start_sect(bdev); return copy_to_user(loc, &g, sizeof g) ? -EFAULT : 0; } diff -urN B5-cdrom_ioctl/drivers/ide/legacy/hd98.c B5-current/drivers/ide/legacy/hd98.c --- B5-cdrom_ioctl/drivers/ide/legacy/hd98.c Sat Aug 9 02:20:47 2003 +++ B5-current/drivers/ide/legacy/hd98.c Sat Sep 27 00:16:51 2003 @@ -652,10 +652,10 @@ enable_irq(HD_IRQ); } -static int hd_ioctl(struct inode * inode, struct file * file, +static int hd_ioctl(struct block_device *bdev, struct file *file, unsigned int cmd, unsigned long arg) { - struct hd_i_struct *disk = inode->i_bdev->bd_disk->private_data; + struct hd_i_struct *disk = bdev->bd_disk->private_data; struct hd_geometry *loc = (struct hd_geometry *) arg; struct hd_geometry g; @@ -666,7 +666,7 @@ g.heads = disk->head; g.sectors = disk->sect; g.cylinders = disk->cyl; - g.start = get_start_sect(inode->i_bdev); + g.start = get_start_sect(bdev); return copy_to_user(loc, &g, sizeof g) ? -EFAULT : 0; } diff -urN B5-cdrom_ioctl/drivers/md/md.c B5-current/drivers/md/md.c --- B5-cdrom_ioctl/drivers/md/md.c Mon Sep 8 19:25:12 2003 +++ B5-current/drivers/md/md.c Sat Sep 27 00:24:41 2003 @@ -2352,11 +2352,10 @@ return 1; } -static int md_ioctl(struct inode *inode, struct file *file, +static int md_ioctl(struct block_device *bdev, struct file *file, unsigned int cmd, unsigned long arg) { char b[BDEVNAME_SIZE]; - unsigned int minor = iminor(inode); int err = 0; struct hd_geometry *loc = (struct hd_geometry *) arg; mddev_t *mddev = NULL; @@ -2364,11 +2363,6 @@ if (!capable(CAP_SYS_ADMIN)) return -EACCES; - if (minor >= MAX_MD_DEVS) { - MD_BUG(); - return -EINVAL; - } - /* * Commands dealing with the RAID driver but not any * particular array: @@ -2397,7 +2391,7 @@ * Commands creating/starting a new array: */ - mddev = inode->i_bdev->bd_inode->u.generic_ip; + mddev = bdev->bd_inode->u.generic_ip; if (!mddev) { BUG(); @@ -2519,7 +2513,7 @@ (short *) &loc->cylinders); if (err) goto abort_unlock; - err = put_user (get_start_sect(inode->i_bdev), + err = put_user (get_start_sect(bdev), (long *) &loc->start); goto done_unlock; } diff -urN B5-cdrom_ioctl/drivers/message/i2o/i2o_block.c B5-current/drivers/message/i2o/i2o_block.c --- B5-cdrom_ioctl/drivers/message/i2o/i2o_block.c Sat Aug 9 02:20:52 2003 +++ B5-current/drivers/message/i2o/i2o_block.c Sat Sep 27 00:23:52 2003 @@ -885,10 +885,10 @@ * Issue device specific ioctl calls. */ -static int i2ob_ioctl(struct inode *inode, struct file *file, +static int i2ob_ioctl(struct block_device *bdev, struct file *file, unsigned int cmd, unsigned long arg) { - struct gendisk *disk = inode->i_bdev->bd_disk; + struct gendisk *disk = bdev->bd_disk; struct i2ob_device *dev = disk->private_data; /* Anyone capable of this syscall can do *real bad* things */ @@ -901,7 +901,7 @@ struct hd_geometry g; i2o_block_biosparam(get_capacity(disk), &g.cylinders, &g.heads, &g.sectors); - g.start = get_start_sect(inode->i_bdev); + g.start = get_start_sect(bdev); return copy_to_user((void *)arg,&g, sizeof(g))?-EFAULT:0; } diff -urN B5-cdrom_ioctl/drivers/mtd/mtd_blkdevs.c B5-current/drivers/mtd/mtd_blkdevs.c --- B5-cdrom_ioctl/drivers/mtd/mtd_blkdevs.c Sat Aug 9 02:20:52 2003 +++ B5-current/drivers/mtd/mtd_blkdevs.c Sat Sep 27 00:16:51 2003 @@ -194,10 +194,10 @@ } -static int blktrans_ioctl(struct inode *inode, struct file *file, +static int blktrans_ioctl(struct block_device *bdev, struct file *file, unsigned int cmd, unsigned long arg) { - struct mtd_blktrans_dev *dev = inode->i_bdev->bd_disk->private_data; + struct mtd_blktrans_dev *dev = bdev->bd_disk->private_data; struct mtd_blktrans_ops *tr = dev->tr; switch (cmd) { @@ -217,7 +217,7 @@ if (ret) return ret; - g.start = get_start_sect(inode->i_bdev); + g.start = get_start_sect(bdev); if (copy_to_user((void *)arg, &g, sizeof(g))) return -EFAULT; return 0; diff -urN B5-cdrom_ioctl/drivers/s390/block/dasd_int.h B5-current/drivers/s390/block/dasd_int.h --- B5-cdrom_ioctl/drivers/s390/block/dasd_int.h Thu Jul 10 13:40:23 2003 +++ B5-current/drivers/s390/block/dasd_int.h Sat Sep 27 00:27:58 2003 @@ -495,7 +495,7 @@ void dasd_ioctl_exit(void); int dasd_ioctl_no_register(struct module *, int, dasd_ioctl_fn_t); int dasd_ioctl_no_unregister(struct module *, int, dasd_ioctl_fn_t); -int dasd_ioctl(struct inode *, struct file *, unsigned int, unsigned long); +int dasd_ioctl(struct block_device *, struct file *, unsigned int, unsigned long); /* externals in dasd_proc.c */ int dasd_proc_init(void); diff -urN B5-cdrom_ioctl/drivers/s390/block/dasd_ioctl.c B5-current/drivers/s390/block/dasd_ioctl.c --- B5-cdrom_ioctl/drivers/s390/block/dasd_ioctl.c Mon Jul 28 11:13:08 2003 +++ B5-current/drivers/s390/block/dasd_ioctl.c Sat Sep 27 00:27:48 2003 @@ -78,10 +78,9 @@ } int -dasd_ioctl(struct inode *inp, struct file *filp, +dasd_ioctl(struct block_device *bdev, struct file *filp, unsigned int no, unsigned long data) { - struct block_device *bdev = inp->i_bdev; struct dasd_device *device = bdev->bd_disk->private_data; struct dasd_ioctl *ioctl; const char *dir; diff -urN B5-cdrom_ioctl/drivers/s390/block/xpram.c B5-current/drivers/s390/block/xpram.c --- B5-cdrom_ioctl/drivers/s390/block/xpram.c Mon Jul 28 11:13:08 2003 +++ B5-current/drivers/s390/block/xpram.c Sat Sep 27 00:23:16 2003 @@ -321,7 +321,7 @@ return 0; } -static int xpram_ioctl (struct inode *inode, struct file *filp, +static int xpram_ioctl (struct block_device *bdev, struct file *filp, unsigned int cmd, unsigned long arg) { struct hd_geometry *geo; diff -urN B5-cdrom_ioctl/drivers/scsi/ide-scsi.c B5-current/drivers/scsi/ide-scsi.c --- B5-cdrom_ioctl/drivers/scsi/ide-scsi.c Mon Sep 8 19:25:14 2003 +++ B5-current/drivers/scsi/ide-scsi.c Sat Sep 27 00:16:51 2003 @@ -649,10 +649,9 @@ return 0; } -static int idescsi_ide_ioctl(struct inode *inode, struct file *file, +static int idescsi_ide_ioctl(struct block_device *bdev, struct file *file, unsigned int cmd, unsigned long arg) { - struct block_device *bdev = inode->i_bdev; return generic_ide_ioctl(bdev, cmd, arg); } diff -urN B5-cdrom_ioctl/drivers/scsi/sd.c B5-current/drivers/scsi/sd.c --- B5-cdrom_ioctl/drivers/scsi/sd.c Mon Sep 8 19:25:15 2003 +++ B5-current/drivers/scsi/sd.c Sat Sep 27 00:16:51 2003 @@ -487,10 +487,9 @@ * Note: most ioctls are forward onto the block subsystem or further * down in the scsi subsytem. **/ -static int sd_ioctl(struct inode * inode, struct file * filp, +static int sd_ioctl(struct block_device *bdev, struct file *filp, unsigned int cmd, unsigned long arg) { - struct block_device *bdev = inode->i_bdev; struct gendisk *disk = bdev->bd_disk; struct scsi_device *sdp = scsi_disk(disk)->device; int error; diff -urN B5-cdrom_ioctl/drivers/scsi/sr.c B5-current/drivers/scsi/sr.c --- B5-cdrom_ioctl/drivers/scsi/sr.c Fri Sep 26 22:00:29 2003 +++ B5-current/drivers/scsi/sr.c Sat Sep 27 00:16:51 2003 @@ -426,10 +426,10 @@ return cdrom_release(&cd->cdi, file); } -static int sr_block_ioctl(struct inode *inode, struct file *file, unsigned cmd, - unsigned long arg) +static int sr_block_ioctl(struct block_device *bdev, struct file *file, + unsigned cmd, unsigned long arg) { - struct scsi_cd *cd = scsi_cd(inode->i_bdev->bd_disk); + struct scsi_cd *cd = scsi_cd(bdev->bd_disk); struct scsi_device *sdev = cd->device; /* @@ -441,7 +441,7 @@ case SCSI_IOCTL_GET_BUS_NUMBER: return scsi_ioctl(sdev, cmd, (void *)arg); } - return cdrom_ioctl(&cd->cdi, inode->i_bdev, cmd, arg); + return cdrom_ioctl(&cd->cdi, bdev, cmd, arg); } static int sr_block_media_changed(struct gendisk *disk) diff -urN B5-cdrom_ioctl/include/linux/fs.h B5-current/include/linux/fs.h --- B5-cdrom_ioctl/include/linux/fs.h Mon Sep 8 19:25:18 2003 +++ B5-current/include/linux/fs.h Sat Sep 27 00:28:56 2003 @@ -760,7 +760,7 @@ struct block_device_operations { int (*open) (struct inode *, struct file *); int (*release) (struct inode *, struct file *); - int (*ioctl) (struct inode *, struct file *, unsigned, unsigned long); + int (*ioctl) (struct block_device *, struct file *, unsigned, unsigned long); int (*media_changed) (struct gendisk *); int (*revalidate_disk) (struct gendisk *); struct module *owner;