Skip to contentSkip to conversation

cciss: make cciss_revalidate not loop through CISS_MAX_LUNS volumes unnecessarily.

PATCH New Stephen M. Cameron 1 participant 1 message Jan 6, 2011 Block layer

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 cciss: make cciss_revalidate not loop through CISS_MAX_LUNS volumes unnecessarily.

From: Stephen M. Cameron <StephenM.Cameron>

---
 drivers/block/cciss.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/block/cciss.c +1 -1
index 8e0f925..8febc20 100644
@@ -2833,7 +2833,7 @@ static int cciss_revalidate(struct gendisk *disk)
 	sector_t total_size;
 	InquiryData_struct *inq_buff = NULL;
 
-	for (logvol = 0; logvol < CISS_MAX_LUN; logvol++) {
+	for (logvol = 0; logvol <= h->highest_lun; logvol++) {
 		if (!h->drv[logvol])
 			continue;
 		if (memcmp(h->drv[logvol]->LunID, drv->LunID,