patch-2.3.99-pre4 linux/drivers/block/rd.c
Next file: linux/drivers/block/xd.c
Previous file: linux/drivers/block/paride/pf.c
Back to the patch index
Back to the overall index
- Lines: 10
- Date:
Sun Apr 9 08:12:56 2000
- Orig file:
v2.3.99-pre3/linux/drivers/block/rd.c
- Orig date:
Fri Mar 10 16:40:42 2000
diff -u --recursive --new-file v2.3.99-pre3/linux/drivers/block/rd.c linux/drivers/block/rd.c
@@ -333,7 +333,8 @@
* Immunize device against invalidate_buffers() and prune_icache().
*/
if (rd_inode[DEVICE_NR(inode->i_rdev)] == NULL) {
- if((rd_inode[DEVICE_NR(inode->i_rdev)] = igrab(inode)) != NULL)
+ if (!inode->i_bdev) return -ENXIO;
+ if ((rd_inode[DEVICE_NR(inode->i_rdev)] = igrab(inode)) != NULL)
atomic_inc(&rd_inode[DEVICE_NR(inode->i_rdev)]->i_bdev->bd_openers);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)