Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 8762
b: refs/heads/master
c: 1f8ef38
h: refs/heads/master
v: v3
  • Loading branch information
Mike Miller authored and Linus Torvalds committed Sep 13, 2005
1 parent 6ed04db commit 1886aa5
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9dc7a86e85593c834bb930f5d5aba3a19ee7a350
refs/heads/master: 1f8ef3806c40e74733f45f436d44b3d8e9a2fa48
8 changes: 8 additions & 0 deletions trunk/drivers/block/cciss.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,6 +468,9 @@ static int cciss_open(struct inode *inode, struct file *filep)
printk(KERN_DEBUG "cciss_open %s\n", inode->i_bdev->bd_disk->disk_name);
#endif /* CCISS_DEBUG */

if (host->busy_initializing)
return -EBUSY;

/*
* Root is allowed to open raw volume zero even if it's not configured
* so array config can still work. Root is also allowed to open any
Expand Down Expand Up @@ -2742,6 +2745,9 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
i = alloc_cciss_hba();
if(i < 0)
return (-1);

hba[i]->busy_initializing = 1;

if (cciss_pci_init(hba[i], pdev) != 0)
goto clean1;

Expand Down Expand Up @@ -2864,6 +2870,7 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
add_disk(disk);
}

hba[i]->busy_initializing = 0;
return(1);

clean4:
Expand All @@ -2884,6 +2891,7 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
clean1:
release_io_mem(hba[i]);
free_hba(i);
hba[i]->busy_initializing = 0;
return(-1);
}

Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/block/cciss.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ struct ctlr_info
int nr_allocs;
int nr_frees;
int busy_configuring;
int busy_initializing;

/* This element holds the zero based queue number of the last
* queue to be started. It is used for fairness.
Expand Down

0 comments on commit 1886aa5

Please sign in to comment.