diff options
author | Heiko Carstens <heiko.carstens@de.ibm.com> | 2011-08-24 11:15:13 -0400 |
---|---|---|
committer | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2011-08-24 11:15:24 -0400 |
commit | 8adb4ca344b48bbbf87ca66fd07a2dd503619714 (patch) | |
tree | 676c225c84bca994aeace3a80ab785eb3e7e6d8f /drivers/s390/char | |
parent | e1202edadbf846f0a4de70c8c0b9fe5a6c88b1cb (diff) |
[S390] memory hotplug: only unassign assigned increments
Make sure that only assigned storage increments are unassigned when
attaching a storage element.
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390/char')
-rw-r--r-- | drivers/s390/char/sclp_cmd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/s390/char/sclp_cmd.c b/drivers/s390/char/sclp_cmd.c index be55fb2b1b1c..837e010299a8 100644 --- a/drivers/s390/char/sclp_cmd.c +++ b/drivers/s390/char/sclp_cmd.c | |||
@@ -383,8 +383,10 @@ static int sclp_attach_storage(u8 id) | |||
383 | switch (sccb->header.response_code) { | 383 | switch (sccb->header.response_code) { |
384 | case 0x0020: | 384 | case 0x0020: |
385 | set_bit(id, sclp_storage_ids); | 385 | set_bit(id, sclp_storage_ids); |
386 | for (i = 0; i < sccb->assigned; i++) | 386 | for (i = 0; i < sccb->assigned; i++) { |
387 | sclp_unassign_storage(sccb->entries[i] >> 16); | 387 | if (sccb->entries[i]) |
388 | sclp_unassign_storage(sccb->entries[i] >> 16); | ||
389 | } | ||
388 | break; | 390 | break; |
389 | default: | 391 | default: |
390 | rc = -EIO; | 392 | rc = -EIO; |