[PATCH] propagate mode through swsusp_close()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
30c40d2c01
commit
c2dd0dae18
@ -651,7 +651,7 @@ static int software_resume(void)
|
||||
pr_debug("PM: Preparing processes for restore.\n");
|
||||
error = prepare_processes();
|
||||
if (error) {
|
||||
swsusp_close();
|
||||
swsusp_close(FMODE_READ);
|
||||
goto Done;
|
||||
}
|
||||
|
||||
|
@ -153,7 +153,7 @@ extern int swsusp_shrink_memory(void);
|
||||
extern void swsusp_free(void);
|
||||
extern int swsusp_read(unsigned int *flags_p);
|
||||
extern int swsusp_write(unsigned int flags);
|
||||
extern void swsusp_close(void);
|
||||
extern void swsusp_close(fmode_t);
|
||||
|
||||
struct timeval;
|
||||
/* kernel/power/swsusp.c */
|
||||
|
@ -426,7 +426,7 @@ int swsusp_write(unsigned int flags)
|
||||
|
||||
release_swap_writer(&handle);
|
||||
out:
|
||||
swsusp_close();
|
||||
swsusp_close(FMODE_WRITE);
|
||||
return error;
|
||||
}
|
||||
|
||||
@ -626,14 +626,14 @@ int swsusp_check(void)
|
||||
* swsusp_close - close swap device.
|
||||
*/
|
||||
|
||||
void swsusp_close(void)
|
||||
void swsusp_close(fmode_t mode)
|
||||
{
|
||||
if (IS_ERR(resume_bdev)) {
|
||||
pr_debug("PM: Image device not initialised\n");
|
||||
return;
|
||||
}
|
||||
|
||||
blkdev_put(resume_bdev, 0); /* move up */
|
||||
blkdev_put(resume_bdev, mode); /* move up */
|
||||
}
|
||||
|
||||
static int swsusp_header_init(void)
|
||||
|
Loading…
Reference in New Issue
Block a user