patch-2.4.14 linux/drivers/block/xd.c

Next file: linux/drivers/block/z2ram.c
Previous file: linux/drivers/block/rd.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.13/linux/drivers/block/xd.c linux/drivers/block/xd.c
@@ -137,6 +137,7 @@
 };
 
 static struct block_device_operations xd_fops = {
+	owner:		THIS_MODULE,
 	open:		xd_open,
 	release:	xd_release,
 	ioctl:		xd_ioctl,
@@ -264,8 +265,6 @@
 {
 	int dev = DEVICE_NR(inode->i_rdev);
 
-	MOD_INC_USE_COUNT;
-
 	if (dev < xd_drives) {
 		while (!xd_valid[dev])
 			sleep_on(&xd_wait_open);
@@ -275,7 +274,6 @@
 		return (0);
 	}
 
-	MOD_DEC_USE_COUNT;
 	return -ENXIO;
 }
 
@@ -374,10 +372,8 @@
 static int xd_release (struct inode *inode, struct file *file)
 {
 	int target = DEVICE_NR(inode->i_rdev);
-	if (target < xd_drives) {
+	if (target < xd_drives)
 		xd_access[target]--;
-		MOD_DEC_USE_COUNT;
-	}
 	return 0;
 }
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)