summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kernel/power/swap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/kernel/power/swap.c b/kernel/power/swap.c
index 81aec3b2c605..b03ff1a33c7f 100644
--- a/kernel/power/swap.c
+++ b/kernel/power/swap.c
@@ -1510,6 +1510,8 @@ end:
return error;
}
+static void *swsusp_holder;
+
/**
* swsusp_check - Check for swsusp signature in the resume device
*/
@@ -1517,14 +1519,13 @@ end:
int swsusp_check(bool snapshot_test)
{
int error;
- void *holder;
fmode_t mode = FMODE_READ;
if (snapshot_test)
mode |= FMODE_EXCL;
hib_resume_bdev = blkdev_get_by_dev(swsusp_resume_device,
- mode, &holder, NULL);
+ mode, &swsusp_holder, NULL);
if (!IS_ERR(hib_resume_bdev)) {
set_blocksize(hib_resume_bdev, PAGE_SIZE);
clear_page(swsusp_header);