diff options
Diffstat (limited to 'kernel/power/user.c')
-rw-r--r-- | kernel/power/user.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/kernel/power/user.c b/kernel/power/user.c index 7cf6713b2325..845acd84cb23 100644 --- a/kernel/power/user.c +++ b/kernel/power/user.c | |||
@@ -52,6 +52,9 @@ static int snapshot_open(struct inode *inode, struct file *filp) | |||
52 | if ((filp->f_flags & O_ACCMODE) == O_RDWR) | 52 | if ((filp->f_flags & O_ACCMODE) == O_RDWR) |
53 | return -ENOSYS; | 53 | return -ENOSYS; |
54 | 54 | ||
55 | if(create_basic_memory_bitmaps()) | ||
56 | return -ENOMEM; | ||
57 | |||
55 | nonseekable_open(inode, filp); | 58 | nonseekable_open(inode, filp); |
56 | data = &snapshot_state; | 59 | data = &snapshot_state; |
57 | filp->private_data = data; | 60 | filp->private_data = data; |
@@ -77,6 +80,7 @@ static int snapshot_release(struct inode *inode, struct file *filp) | |||
77 | struct snapshot_data *data; | 80 | struct snapshot_data *data; |
78 | 81 | ||
79 | swsusp_free(); | 82 | swsusp_free(); |
83 | free_basic_memory_bitmaps(); | ||
80 | data = filp->private_data; | 84 | data = filp->private_data; |
81 | free_all_swap_pages(data->swap, data->bitmap); | 85 | free_all_swap_pages(data->swap, data->bitmap); |
82 | free_bitmap(data->bitmap); | 86 | free_bitmap(data->bitmap); |