segment save will exit with a lock held if the passed segment doesn't
exist. Any subsequent call to segment_save will lead to a deadlock.
Fix this and give up the lock before returning.
Signed-off-by: Heiko Carstens <[email protected]>
Signed-off-by: Martin Schwidefsky <[email protected]>
seg = segment_by_name (name);
if (seg == NULL) {
- PRINT_ERR ("could not find segment %s in segment_save, please report to
[email protected]\n",name);
- return;
+ PRINT_ERR("could not find segment %s in segment_save, please "
+ goto out;
}
startpfn = seg->start_addr >> PAGE_SHIFT;