Commit a929bb5e authored by Jody McIntyre's avatar Jody McIntyre

Dan Dennedy:

reorganise LUN handling to resolve oops
Signed-off-by: default avatarJody McIntyre <scjody@modernduck.com>
parent 772137b4
......@@ -936,17 +936,14 @@ static struct unit_directory *nodemgr_process_unit_directory
/* Logical Unit Number */
if (kv->key.type == CSR1212_KV_TYPE_IMMEDIATE) {
if (ud->flags & UNIT_DIRECTORY_HAS_LUN) {
nodemgr_register_device(ne, ud, &ne->device);
ud_child = kmalloc(sizeof(struct unit_directory), GFP_KERNEL);
if (!ud_child)
goto unit_directory_error;
memcpy(ud_child, ud, sizeof(struct unit_directory));
ud = ud_child;
nodemgr_register_device(ne, ud_child, &ne->device);
ud_child = NULL;
ud->id = (*id)++;
ud->device.bus = NULL;
}
ud->lun = kv->value.immediate;
ud->flags |= UNIT_DIRECTORY_HAS_LUN;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment