aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiwei Bie <[email protected]>2024-11-05 00:32:00 +0800
committerJohannes Berg <[email protected]>2024-11-07 18:05:22 +0100
commitdf700802abcac3c7c4a4ced099aa42b9a144eea8 (patch)
tree98484f0499bc96fcaded122b8e320df61946fabb
parent1d4d0ef84a7f386205ad141ff8727e027b0581e4 (diff)
um: ubd: Initialize ubd's disk pointer in ubd_add
Currently, the initialization of the disk pointer in the ubd structure is missing. It should be initialized with the allocated gendisk pointer in ubd_add(). Fixes: 32621ad7a7ea ("ubd: remove the ubd_gendisk array") Signed-off-by: Tiwei Bie <[email protected]> Acked-By: Anton Ivanov <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Johannes Berg <[email protected]>
-rw-r--r--arch/um/drivers/ubd_kern.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c
index 2b8d04e67600..f19173da64d8 100644
--- a/arch/um/drivers/ubd_kern.c
+++ b/arch/um/drivers/ubd_kern.c
@@ -898,6 +898,8 @@ static int ubd_add(int n, char **error_out)
if (err)
goto out_cleanup_disk;
+ ubd_dev->disk = disk;
+
return 0;
out_cleanup_disk: