patch-2.4.5 linux/drivers/block/xd.c
Next file: linux/drivers/cdrom/cdrom.c
Previous file: linux/drivers/block/swim_iop.c
Back to the patch index
Back to the overall index
- Lines: 35
- Date:
Thu May 24 15:14:08 2001
- Orig file:
v2.4.4/linux/drivers/block/xd.c
- Orig date:
Fri Feb 16 16:02:35 2001
diff -u --recursive --new-file v2.4.4/linux/drivers/block/xd.c linux/drivers/block/xd.c
@@ -401,13 +401,7 @@
for (partition = xd_gendisk.max_p - 1; partition >= 0; partition--) {
int minor = (start | partition);
- kdev_t devp = MKDEV(MAJOR_NR, minor);
- struct super_block * sb = get_super(devp);
-
- sync_dev(devp);
- if (sb)
- invalidate_inodes(sb);
- invalidate_buffers(devp);
+ invalidate_device(MKDEV(MAJOR_NR, minor), 1);
xd_gendisk.part[minor].start_sect = 0;
xd_gendisk.part[minor].nr_sects = 0;
};
@@ -1160,19 +1154,7 @@
void cleanup_module(void)
{
- int partition,dev,start;
-
devfs_unregister_blkdev(MAJOR_NR, "xd");
- for (dev = 0; dev < xd_drives; dev++) {
- start = dev << xd_gendisk.minor_shift;
- for (partition = xd_gendisk.max_p - 1; partition >= 0; partition--) {
- int minor = (start | partition);
- kdev_t devp = MKDEV(MAJOR_NR, minor);
- start = dev << xd_gendisk.minor_shift;
- sync_dev(devp);
- invalidate_buffers(devp);
- }
- }
xd_done();
devfs_unregister (devfs_handle);
if (xd_drives) {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)