Merge back earlier material related to system sleep for 7.1

This commit is contained in:
Rafael J. Wysocki 2026-03-27 11:56:38 +01:00
commit 949a5ed082
2 changed files with 5 additions and 4 deletions

View File

@ -14,8 +14,6 @@
#include <linux/kdebug.h>
#include <linux/pgtable.h>
#include <crypto/hash.h>
#include <asm/e820/api.h>
#include <asm/init.h>
#include <asm/proto.h>

View File

@ -322,11 +322,14 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd,
error = snapshot_write_finalize(&data->handle);
if (error)
break;
if (data->mode != O_WRONLY || !data->frozen ||
!snapshot_image_loaded(&data->handle)) {
if (data->mode != O_WRONLY || !data->frozen) {
error = -EPERM;
break;
}
if (!snapshot_image_loaded(&data->handle)) {
error = -ENODATA;
break;
}
error = hibernation_restore(data->platform_support);
break;