patch-2.4.5 linux/fs/devfs/base.c
Next file: linux/fs/devices.c
Previous file: linux/fs/dcache.c
Back to the patch index
Back to the overall index
- Lines: 35
- Date:
Tue May 22 09:35:42 2001
- Orig file:
v2.4.4/linux/fs/devfs/base.c
- Orig date:
Tue Apr 17 15:04:10 2001
diff -u --recursive --new-file v2.4.4/linux/fs/devfs/base.c linux/fs/devfs/base.c
@@ -2156,7 +2156,6 @@
int tmp;
kdev_t dev = MKDEV (de->u.fcb.u.device.major, de->u.fcb.u.device.minor);
struct block_device_operations *bdops = de->u.fcb.ops;
- struct super_block * sb;
extern int warn_no_part;
if ( !S_ISBLK (de->mode) ) return 0;
@@ -2165,10 +2164,8 @@
if ( !bdops->check_media_change (dev) ) return 0;
printk ( KERN_DEBUG "VFS: Disk change detected on device %s\n",
kdevname (dev) );
- sb = get_super (dev);
- if ( sb && invalidate_inodes (sb) )
+ if (invalidate_device(dev, 0))
printk("VFS: busy inodes on changed media..\n");
- invalidate_buffers (dev);
/* Ugly hack to disable messages about unable to read partition table */
tmp = warn_no_part;
warn_no_part = 0;
@@ -2259,12 +2256,13 @@
{
inode->i_rdev = MKDEV (de->u.fcb.u.device.major,
de->u.fcb.u.device.minor);
+ inode->i_cdev = cdget (kdev_t_to_nr(inode->i_rdev));
}
else if ( S_ISBLK (de->inode.mode) )
{
inode->i_rdev = MKDEV (de->u.fcb.u.device.major,
de->u.fcb.u.device.minor);
- inode->i_bdev = bdget (inode->i_rdev);
+ inode->i_bdev = bdget (kdev_t_to_nr(inode->i_rdev));
if (inode->i_bdev)
{
if (!inode->i_bdev->bd_op && de->u.fcb.ops)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)