mirror of
https://github.com/torvalds/linux.git
synced 2026-05-12 16:18:45 +02:00
Merge back earlier material related to system sleep for 7.1
This commit is contained in:
commit
949a5ed082
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user