提交 8adb4ca3 编写于 作者: H Heiko Carstens 提交者: Martin Schwidefsky

[S390] memory hotplug: only unassign assigned increments

Make sure that only assigned storage increments are unassigned when
attaching a storage element.
Signed-off-by: NHeiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: NMartin Schwidefsky <schwidefsky@de.ibm.com>
上级 e1202eda
...@@ -383,8 +383,10 @@ static int sclp_attach_storage(u8 id) ...@@ -383,8 +383,10 @@ static int sclp_attach_storage(u8 id)
switch (sccb->header.response_code) { switch (sccb->header.response_code) {
case 0x0020: case 0x0020:
set_bit(id, sclp_storage_ids); set_bit(id, sclp_storage_ids);
for (i = 0; i < sccb->assigned; i++) for (i = 0; i < sccb->assigned; i++) {
sclp_unassign_storage(sccb->entries[i] >> 16); if (sccb->entries[i])
sclp_unassign_storage(sccb->entries[i] >> 16);
}
break; break;
default: default:
rc = -EIO; rc = -EIO;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册