未验证 提交 2eda3c06 编写于 作者: O openeuler-ci-bot 提交者: Gitee

!1502 block: don't set GD_NEED_PART_SCAN if scan partition failed

Merge Pull Request from: @ci-robot 
 
PR sync from: Li Lingfeng <lilingfeng3@huawei.com>
https://mailweb.openeuler.org/hyperkitty/list/kernel@openeuler.org/message/3GH4GOG4AWQWHSAMBTS4ZV7OXVQKBRUE/ 
 
https://gitee.com/openeuler/kernel/issues/I7F7J3 
 
Link:https://gitee.com/openeuler/kernel/pulls/1502 

Reviewed-by: Yu Kuai <yukuai3@huawei.com> 
Reviewed-by: Jialin Zhang <zhangjialin11@huawei.com> 
Signed-off-by: Jialin Zhang <zhangjialin11@huawei.com> 
......@@ -770,6 +770,13 @@ int disk_scan_partitions(struct gendisk *disk, fmode_t mode)
else
blkdev_put(bdev, mode & ~FMODE_EXCL);
/*
* If blkdev_get_by_dev() failed early, GD_NEED_PART_SCAN is still set,
* and this will cause that re-assemble partitioned raid device will
* creat partition for underlying disk.
*/
clear_bit(GD_NEED_PART_SCAN, &disk->state);
if (!(mode & FMODE_EXCL)) {
bd_abort_claiming(claim, claim, disk_scan_partitions);
bdput(claim);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册