Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 57839
b: refs/heads/master
c: 2f41ddd
h: refs/heads/master
i:
  57837: 2ffc386
  57835: 21dd878
  57831: 44d8a3b
  57823: 3b4a449
v: v3
  • Loading branch information
Rafael J. Wysocki authored and Linus Torvalds committed Jun 16, 2007
1 parent fbe47da commit 58638fa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b1d93de3e4633c4cbfd622a3564d8268a116a46a
refs/heads/master: 2f41dddbbd7193fb5cdae0a24db4d378d56885fd
4 changes: 3 additions & 1 deletion trunk/kernel/power/user.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@ static ssize_t snapshot_read(struct file *filp, char __user *buf,
ssize_t res;

data = filp->private_data;
if (!data->ready)
return -ENODATA;
res = snapshot_read_next(&data->handle, count);
if (res > 0) {
if (copy_to_user(buf, data_of(data->handle), res))
Expand Down Expand Up @@ -245,7 +247,7 @@ static int snapshot_ioctl(struct inode *inode, struct file *filp,
break;

case SNAPSHOT_UNFREEZE:
if (!data->frozen)
if (!data->frozen || data->ready)
break;
mutex_lock(&pm_mutex);
thaw_processes();
Expand Down

0 comments on commit 58638fa

Please sign in to comment.