patch-2.1.50 linux/drivers/scsi/sd.c

Next file: linux/drivers/scsi/ultrastor.c
Previous file: linux/drivers/scsi/ncr53c8xx.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.49/linux/drivers/scsi/sd.c linux/drivers/scsi/sd.c
@@ -1509,8 +1509,9 @@
     for (i=max_p - 1; i >=0 ; i--) {
 	int minor = start+i;
 	kdev_t devi = MKDEV(MAJOR_NR, minor);
+	struct super_block *sb = get_super(devi);
 	sync_dev(devi);
-	invalidate_inodes(devi);
+	if (sb) invalidate_inodes(sb);
 	invalidate_buffers(devi);
 	gdev->part[minor].start_sect = 0;
 	gdev->part[minor].nr_sects = 0;
@@ -1561,8 +1562,9 @@
 	    for (i=max_p - 1; i >=0 ; i--) {
 		int minor = start+i;
 		kdev_t devi = MKDEV(MAJOR_NR, minor);
+		struct super_block *sb = get_super(devi);
 		sync_dev(devi);
-		invalidate_inodes(devi);
+		if (sb) invalidate_inodes(sb);
 		invalidate_buffers(devi);
 		sd_gendisk.part[minor].start_sect = 0;
 		sd_gendisk.part[minor].nr_sects = 0;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov