diff options
Diffstat (limited to 'drivers/block/cciss.c')
-rw-r--r-- | drivers/block/cciss.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/block/cciss.c b/drivers/block/cciss.c index 4a49d7972126..8bcd6c498c60 100644 --- a/drivers/block/cciss.c +++ b/drivers/block/cciss.c | |||
@@ -468,6 +468,9 @@ static int cciss_open(struct inode *inode, struct file *filep) | |||
468 | printk(KERN_DEBUG "cciss_open %s\n", inode->i_bdev->bd_disk->disk_name); | 468 | printk(KERN_DEBUG "cciss_open %s\n", inode->i_bdev->bd_disk->disk_name); |
469 | #endif /* CCISS_DEBUG */ | 469 | #endif /* CCISS_DEBUG */ |
470 | 470 | ||
471 | if (host->busy_initializing) | ||
472 | return -EBUSY; | ||
473 | |||
471 | /* | 474 | /* |
472 | * Root is allowed to open raw volume zero even if it's not configured | 475 | * Root is allowed to open raw volume zero even if it's not configured |
473 | * so array config can still work. Root is also allowed to open any | 476 | * so array config can still work. Root is also allowed to open any |
@@ -2742,6 +2745,9 @@ static int __devinit cciss_init_one(struct pci_dev *pdev, | |||
2742 | i = alloc_cciss_hba(); | 2745 | i = alloc_cciss_hba(); |
2743 | if(i < 0) | 2746 | if(i < 0) |
2744 | return (-1); | 2747 | return (-1); |
2748 | |||
2749 | hba[i]->busy_initializing = 1; | ||
2750 | |||
2745 | if (cciss_pci_init(hba[i], pdev) != 0) | 2751 | if (cciss_pci_init(hba[i], pdev) != 0) |
2746 | goto clean1; | 2752 | goto clean1; |
2747 | 2753 | ||
@@ -2864,6 +2870,7 @@ static int __devinit cciss_init_one(struct pci_dev *pdev, | |||
2864 | add_disk(disk); | 2870 | add_disk(disk); |
2865 | } | 2871 | } |
2866 | 2872 | ||
2873 | hba[i]->busy_initializing = 0; | ||
2867 | return(1); | 2874 | return(1); |
2868 | 2875 | ||
2869 | clean4: | 2876 | clean4: |
@@ -2884,6 +2891,7 @@ clean2: | |||
2884 | clean1: | 2891 | clean1: |
2885 | release_io_mem(hba[i]); | 2892 | release_io_mem(hba[i]); |
2886 | free_hba(i); | 2893 | free_hba(i); |
2894 | hba[i]->busy_initializing = 0; | ||
2887 | return(-1); | 2895 | return(-1); |
2888 | } | 2896 | } |
2889 | 2897 | ||