diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2007-10-08 13:21:10 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-10-21 07:49:02 -0400 |
commit | c2dd0dae185423fb243b13d490c3fcfaa18ff333 (patch) | |
tree | e2d721533713fc2b09b6d06d64a306bbcf6c4c76 /kernel/power | |
parent | 30c40d2c01f68c7eb1a41ab3552bdaf5dbf300d4 (diff) |
[PATCH] propagate mode through swsusp_close()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel/power')
-rw-r--r-- | kernel/power/disk.c | 2 | ||||
-rw-r--r-- | kernel/power/power.h | 2 | ||||
-rw-r--r-- | kernel/power/swap.c | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/kernel/power/disk.c b/kernel/power/disk.c index 331f9836383f..c9d74083746f 100644 --- a/kernel/power/disk.c +++ b/kernel/power/disk.c | |||
@@ -651,7 +651,7 @@ static int software_resume(void) | |||
651 | pr_debug("PM: Preparing processes for restore.\n"); | 651 | pr_debug("PM: Preparing processes for restore.\n"); |
652 | error = prepare_processes(); | 652 | error = prepare_processes(); |
653 | if (error) { | 653 | if (error) { |
654 | swsusp_close(); | 654 | swsusp_close(FMODE_READ); |
655 | goto Done; | 655 | goto Done; |
656 | } | 656 | } |
657 | 657 | ||
diff --git a/kernel/power/power.h b/kernel/power/power.h index acc0c101dbd5..46b5ec7a3afb 100644 --- a/kernel/power/power.h +++ b/kernel/power/power.h | |||
@@ -153,7 +153,7 @@ extern int swsusp_shrink_memory(void); | |||
153 | extern void swsusp_free(void); | 153 | extern void swsusp_free(void); |
154 | extern int swsusp_read(unsigned int *flags_p); | 154 | extern int swsusp_read(unsigned int *flags_p); |
155 | extern int swsusp_write(unsigned int flags); | 155 | extern int swsusp_write(unsigned int flags); |
156 | extern void swsusp_close(void); | 156 | extern void swsusp_close(fmode_t); |
157 | 157 | ||
158 | struct timeval; | 158 | struct timeval; |
159 | /* kernel/power/swsusp.c */ | 159 | /* kernel/power/swsusp.c */ |
diff --git a/kernel/power/swap.c b/kernel/power/swap.c index 7b9d611c1106..178b001a4f17 100644 --- a/kernel/power/swap.c +++ b/kernel/power/swap.c | |||
@@ -426,7 +426,7 @@ int swsusp_write(unsigned int flags) | |||
426 | 426 | ||
427 | release_swap_writer(&handle); | 427 | release_swap_writer(&handle); |
428 | out: | 428 | out: |
429 | swsusp_close(); | 429 | swsusp_close(FMODE_WRITE); |
430 | return error; | 430 | return error; |
431 | } | 431 | } |
432 | 432 | ||
@@ -626,14 +626,14 @@ int swsusp_check(void) | |||
626 | * swsusp_close - close swap device. | 626 | * swsusp_close - close swap device. |
627 | */ | 627 | */ |
628 | 628 | ||
629 | void swsusp_close(void) | 629 | void swsusp_close(fmode_t mode) |
630 | { | 630 | { |
631 | if (IS_ERR(resume_bdev)) { | 631 | if (IS_ERR(resume_bdev)) { |
632 | pr_debug("PM: Image device not initialised\n"); | 632 | pr_debug("PM: Image device not initialised\n"); |
633 | return; | 633 | return; |
634 | } | 634 | } |
635 | 635 | ||
636 | blkdev_put(resume_bdev, 0); /* move up */ | 636 | blkdev_put(resume_bdev, mode); /* move up */ |
637 | } | 637 | } |
638 | 638 | ||
639 | static int swsusp_header_init(void) | 639 | static int swsusp_header_init(void) |