Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] switch z2ram

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro ab746cb9 f3f68b36

+5 -6
+5 -6
drivers/block/z2ram.c
··· 137 137 return; 138 138 } 139 139 140 - static int 141 - z2_open( struct inode *inode, struct file *filp ) 140 + static int z2_open(struct block_device *bdev, fmode_t mode) 142 141 { 143 142 int device; 144 143 int max_z2_map = ( Z2RAM_SIZE / Z2RAM_CHUNKSIZE ) * ··· 146 147 sizeof( z2ram_map[0] ); 147 148 int rc = -ENOMEM; 148 149 149 - device = iminor(inode); 150 + device = MINOR(bdev->bd_dev); 150 151 151 152 if ( current_device != -1 && current_device != device ) 152 153 { ··· 298 299 } 299 300 300 301 static int 301 - z2_release( struct inode *inode, struct file *filp ) 302 + z2_release(struct gendisk *disk, fmode_t mode) 302 303 { 303 304 if ( current_device == -1 ) 304 305 return 0; ··· 313 314 static struct block_device_operations z2_fops = 314 315 { 315 316 .owner = THIS_MODULE, 316 - .__open = z2_open, 317 - .__release = z2_release, 317 + .open = z2_open, 318 + .release = z2_release, 318 319 }; 319 320 320 321 static struct kobject *z2_find(dev_t dev, int *part, void *data)