patch-2.3.37 linux/drivers/block/loop.c

Next file: linux/drivers/block/swim3.c
Previous file: linux/drivers/block/ide-pci.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.3.36/linux/drivers/block/loop.c linux/drivers/block/loop.c
@@ -375,7 +375,10 @@
 	}
 
 	if (S_ISBLK(inode->i_mode)) {
-		error = blkdev_open(inode, file);
+		/* dentry will be wired, so... */
+		error = blkdev_get(inode->i_bdev, file->f_mode,
+				   file->f_flags, BDEV_FILE);
+
 		lo->lo_device = inode->i_rdev;
 		lo->lo_flags = 0;
 
@@ -482,7 +485,8 @@
 		return -EBUSY;
 
 	if (S_ISBLK(dentry->d_inode->i_mode))
-		blkdev_release (dentry->d_inode);
+		blkdev_put(dentry->d_inode->i_bdev, BDEV_FILE);
+
 	lo->lo_dentry = NULL;
 
 	if (lo->lo_backing_file != NULL) {

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