lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20070705140648.2c55c67e.kristen.c.accardi@intel.com>
Date:	Thu, 5 Jul 2007 14:06:48 -0700
From:	Kristen Carlson Accardi <kristen.c.accardi@...el.com>
To:	James.Bottomley@...elEye.com
Cc:	akpm@...ux-foundation.org, jeff@...zik.org,
	linux-scsi@...r.kernel.org, linux-kernel@...r.kernel.org,
	Kristen Carlson Accardi <kristen.c.accardi@...el.com>
Subject: [patch 1/3] SCSI: osst: remove gendisk from private data struct

Since gendisk is now part of scsi_device, don't store this struct
in private data struct

Signed-off-by:  Kristen Carlson Accardi <kristen.c.accardi@...el.com>
Index: 2.6-git/drivers/scsi/osst.c
===================================================================
--- 2.6-git.orig/drivers/scsi/osst.c
+++ 2.6-git/drivers/scsi/osst.c
@@ -191,7 +191,7 @@ static int osst_write_error_recovery(str
 
 static inline char *tape_name(struct osst_tape *tape)
 {
-	return tape->drive->disk_name;
+	return tape->device->disk->disk_name;
 }
 .
 /* Routines that handle the interaction with mid-layer SCSI routines */
@@ -5803,7 +5803,6 @@ static int osst_probe(struct device *dev
 	drive->private_data = &tpnt->driver;
 	sprintf(drive->disk_name, "osst%d", dev_num);
 	tpnt->driver = &osst_template;
-	tpnt->drive = drive;
 	tpnt->in_use = 0;
 	tpnt->capacity = 0xfffff;
 	tpnt->dirty = 0;
@@ -5885,6 +5884,8 @@ static int osst_probe(struct device *dev
 			goto out_free_sysfs1;
 	}
 
+	SDp->disk = drive;
+
 	sdev_printk(KERN_INFO, SDp,
 		"osst :I: Attached OnStream %.5s tape as %s\n",
 		SDp->model, tape_name(tpnt));
@@ -5915,7 +5916,7 @@ static int osst_remove(struct device *de
 			osst_sysfs_destroy(MKDEV(OSST_MAJOR, i));
 			osst_sysfs_destroy(MKDEV(OSST_MAJOR, i+128));
 			tpnt->device = NULL;
-			put_disk(tpnt->drive);
+			put_disk(tpnt->device->disk);
 			os_scsi_tapes[i] = NULL;
 			osst_nr_dev--;
 			write_unlock(&os_scsi_tapes_lock);
@@ -5988,7 +5989,7 @@ static void __exit exit_osst (void)
 				normalize_buffer(STp->buffer);
 				kfree(STp->buffer);
 			}
-			put_disk(STp->drive);
+			put_disk(STp->device->disk);
 			kfree(STp);
 		}
 		kfree(os_scsi_tapes);
Index: 2.6-git/drivers/scsi/osst.h
===================================================================
--- 2.6-git.orig/drivers/scsi/osst.h
+++ 2.6-git/drivers/scsi/osst.h
@@ -623,7 +623,6 @@ struct osst_tape {
   unsigned char last_cmnd[6];
   unsigned char last_sense[16];
 #endif
-  struct gendisk *drive;
 } ;
 
 /* scsi tape command */

-- 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ