mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
Merge branch 'for-linus' of git://neil.brown.name/md
* 'for-linus' of git://neil.brown.name/md: md: don't retry recovery of raid1 that fails due to error on source drive. md: Allow md devices to be created by name. md: make devices disappear when they are no longer needed. md: centralise all freeing of an 'mddev' in 'md_free' md: move allocation of ->queue from mddev_find to md_probe md: need another print_sb for mdp_superblock_1 md: use list_for_each_entry macro directly md: raid0: make hash_spacing and preshift sector-based. md: raid0: Represent the size of strip zones in sectors. md: raid0 create_strip_zones(): Add KERN_INFO/KERN_ERR to printk's. md: raid0 create_strip_zones(): Make two local variables sector-based. md: raid0: Represent zone->zone_offset in sectors. md: raid0: Represent device offset in sectors. md: raid0_make_request(): Replace local variable block by sector. md: raid0_make_request(): Remove local variable chunk_size. md: raid0_make_request(): Replace chunksize_bits by chunksect_bits. md: use sysfs_notify_dirent to notify changes to md/sync_action. md: fix bitmap-on-external-file bug.
This commit is contained in:
commit
894bcdfb1a
13 changed files with 435 additions and 247 deletions
|
|
@ -1005,6 +1005,7 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part)
|
|||
}
|
||||
|
||||
lock_kernel();
|
||||
restart:
|
||||
|
||||
ret = -ENXIO;
|
||||
disk = get_gendisk(bdev->bd_dev, &partno);
|
||||
|
|
@ -1025,6 +1026,19 @@ static int __blkdev_get(struct block_device *bdev, fmode_t mode, int for_part)
|
|||
|
||||
if (disk->fops->open) {
|
||||
ret = disk->fops->open(bdev, mode);
|
||||
if (ret == -ERESTARTSYS) {
|
||||
/* Lost a race with 'disk' being
|
||||
* deleted, try again.
|
||||
* See md.c
|
||||
*/
|
||||
disk_put_part(bdev->bd_part);
|
||||
bdev->bd_part = NULL;
|
||||
module_put(disk->fops->owner);
|
||||
put_disk(disk);
|
||||
bdev->bd_disk = NULL;
|
||||
mutex_unlock(&bdev->bd_mutex);
|
||||
goto restart;
|
||||
}
|
||||
if (ret)
|
||||
goto out_clear;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue