1eb6b25c2a
- drbd: build error against kernel v5.18 (bsc#1201335) - remove patch: move_bdi_from_request_queue_to_gendisk - change exist patches name from bsc#1192929: old name: make_block_holder_optional.patch move_kvmalloc_related_to_slab.patch polling_to_bio_base.patch pass_gend_to_blk_queue_update_readahead.patch dax_support.patch add_disk_error_handle.patch have_void_drbd_submit_bio.patch remove_bdgrab.patch new name: bsc-1192929_01-make_block_holder_optional.patch bsc-1192929_02-move_kvmalloc_related_to_slab.patch bsc-1192929_03-polling_to_bio_base.patch bsc-1192929_04-pass_gend_to_blk_queue_update_readahead.patch bsc-1192929_06-dax_support.patch bsc-1192929_07-add_disk_error_handle.patch bsc-1192929_08-have_void_drbd_submit_bio.patch bsc-1192929_09-remove_bdgrab.patch - add patch: + bsc-1201335_01-compat-test-and-cocci-patch-for-bdi-in-gendisk.patch + bsc-1201335_02-0001-compat-only-apply-bdi-pointer-patch-if-bdi-is-in-req.patch + bsc-1201335_03-genhd.patch + bsc-1201335_04-bio_alloc_bioset.patch + bsc-1201335_05-bio_alloc.patch + bsc-1201335_06-bdi.patch + bsc-1201335_07-write-same.patch + bsc-1201335_08-bio_clone_fast.patch OBS-URL: https://build.opensuse.org/request/show/987977 OBS-URL: https://build.opensuse.org/package/show/network:ha-clustering:Factory/drbd?expand=0&rev=137
27 lines
890 B
Diff
27 lines
890 B
Diff
/* {"version":"v5.16-rc1~73", "commit": "e92ab4eda516a5bfd96c087282ebe9521deba4f4", "comment": "drbd: add error handling support for add_disk()"} */
|
|
|
|
diff -Naur drbd-9.0.30~1+git.8e9c0812.orig/drbd/drbd_main.c drbd-9.0.30~1+git.8e9c0812/drbd/drbd_main.c
|
|
--- drbd-9.0.30~1+git.8e9c0812.orig/drbd/drbd_main.c 2021-11-19 15:36:33.405592808 +0800
|
|
+++ drbd-9.0.30~1+git.8e9c0812/drbd/drbd_main.c 2021-11-19 15:43:32.799929686 +0800
|
|
@@ -3794,7 +3794,10 @@
|
|
goto out_remove_peer_device;
|
|
}
|
|
|
|
- add_disk(disk);
|
|
+ err = add_disk(disk);
|
|
+ if (err)
|
|
+ goto out_cleanup_disk;
|
|
+
|
|
device->have_quorum[OLD] =
|
|
device->have_quorum[NEW] =
|
|
(resource->res_opts.quorum == QOU_OFF);
|
|
@@ -3811,6 +3814,8 @@
|
|
*p_device = device;
|
|
return NO_ERROR;
|
|
|
|
+out_cleanup_disk:
|
|
+ blk_cleanup_disk(disk);
|
|
out_remove_peer_device:
|
|
list_add_rcu(&tmp, &device->peer_devices);
|
|
list_del_init(&device->peer_devices);
|