Message ID | 61d94dd74e238edeb264d8e3aa43847b93f986b6.1598042152.git.anchalag@amazon.com |
---|---|
State | New |
Headers | show |
Series | Fix PM hibernation in Xen guests | expand |
diff --git a/kernel/power/user.c b/kernel/power/user.c index d5eedc2baa2a..704a7173e99c 100644 --- a/kernel/power/user.c +++ b/kernel/power/user.c @@ -242,9 +242,12 @@ static int snapshot_set_swap_area(struct snapshot_data *data, return -EINVAL; } data->swap = swap_type_of(swdev, offset, &bdev); - if (data->swap < 0) + if (data->swap < 0) { return -ENODEV; - + } else { + swsusp_resume_device = swdev; + swsusp_resume_block = offset; + } data->bd_inode = bdev->bd_inode; bdput(bdev); return 0;