diff options
Diffstat (limited to 'kernel/power/swap.c')
-rw-r--r-- | kernel/power/swap.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/power/swap.c b/kernel/power/swap.c index 80ccac849e46..7b9d611c1106 100644 --- a/kernel/power/swap.c +++ b/kernel/power/swap.c | |||
@@ -178,7 +178,7 @@ static int swsusp_swap_check(void) /* This is called before saving image */ | |||
178 | 178 | ||
179 | res = set_blocksize(resume_bdev, PAGE_SIZE); | 179 | res = set_blocksize(resume_bdev, PAGE_SIZE); |
180 | if (res < 0) | 180 | if (res < 0) |
181 | blkdev_put(resume_bdev); | 181 | blkdev_put(resume_bdev, FMODE_WRITE); |
182 | 182 | ||
183 | return res; | 183 | return res; |
184 | } | 184 | } |
@@ -574,7 +574,7 @@ int swsusp_read(unsigned int *flags_p) | |||
574 | error = load_image(&handle, &snapshot, header->pages - 1); | 574 | error = load_image(&handle, &snapshot, header->pages - 1); |
575 | release_swap_reader(&handle); | 575 | release_swap_reader(&handle); |
576 | 576 | ||
577 | blkdev_put(resume_bdev); | 577 | blkdev_put(resume_bdev, FMODE_READ); |
578 | 578 | ||
579 | if (!error) | 579 | if (!error) |
580 | pr_debug("PM: Image successfully loaded\n"); | 580 | pr_debug("PM: Image successfully loaded\n"); |
@@ -609,7 +609,7 @@ int swsusp_check(void) | |||
609 | return -EINVAL; | 609 | return -EINVAL; |
610 | } | 610 | } |
611 | if (error) | 611 | if (error) |
612 | blkdev_put(resume_bdev); | 612 | blkdev_put(resume_bdev, FMODE_READ); |
613 | else | 613 | else |
614 | pr_debug("PM: Signature found, resuming\n"); | 614 | pr_debug("PM: Signature found, resuming\n"); |
615 | } else { | 615 | } else { |
@@ -633,7 +633,7 @@ void swsusp_close(void) | |||
633 | return; | 633 | return; |
634 | } | 634 | } |
635 | 635 | ||
636 | blkdev_put(resume_bdev); | 636 | blkdev_put(resume_bdev, 0); /* move up */ |
637 | } | 637 | } |
638 | 638 | ||
639 | static int swsusp_header_init(void) | 639 | static int swsusp_header_init(void) |