summaryrefslogtreecommitdiffstats
path: root/kernel/power/swap.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2007-10-08 19:21:10 +0200
committerAl Viro <viro@zeniv.linux.org.uk>2008-10-21 13:49:02 +0200
commitc2dd0dae185423fb243b13d490c3fcfaa18ff333 (patch)
treee2d721533713fc2b09b6d06d64a306bbcf6c4c76 /kernel/power/swap.c
parent[PATCH] propagate mode through open_bdev_excl/close_bdev_excl (diff)
downloadlinux-c2dd0dae185423fb243b13d490c3fcfaa18ff333.tar.xz
linux-c2dd0dae185423fb243b13d490c3fcfaa18ff333.zip
[PATCH] propagate mode through swsusp_close()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel/power/swap.c')
-rw-r--r--kernel/power/swap.c6
1 files changed, 3 insertions, 3 deletions
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)
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)