Skip to content

Commit

Permalink
um: ubd: Initialize ubd's disk pointer in ubd_add
Browse files Browse the repository at this point in the history
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: 32621ad ("ubd: remove the ubd_gendisk array")
Signed-off-by: Tiwei Bie <tiwei.btw@antgroup.com>
Acked-By: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Link: https://patch.msgid.link/20241104163203.435515-2-tiwei.btw@antgroup.com
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
  • Loading branch information
btw616 authored and jmberg-intel committed Nov 7, 2024
1 parent 1d4d0ef commit df70080
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions arch/um/drivers/ubd_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit df70080

Please sign in to comment.