aboutsummaryrefslogtreecommitdiff
path: root/kernel/power
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2008-02-22 20:40:24 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2008-10-21 07:48:58 -0400
commit9a1c3542768b5a58e45a9216921cd10a3bae1205 (patch)
treec20ffda950db868ec7e1e35aed532962de2ecfd9 /kernel/power
parent511de73ff09034fb89c8d54bed201a10d057328c (diff)
[PATCH] pass fmode_t to blkdev_put()
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'kernel/power')
-rw-r--r--kernel/power/swap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/power/swap.c b/kernel/power/swap.c
index 80ccac849e4..7b9d611c110 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 */
res = set_blocksize(resume_bdev, PAGE_SIZE);
if (res < 0)
- blkdev_put(resume_bdev);
+ blkdev_put(resume_bdev, FMODE_WRITE);
return res;
}
@@ -574,7 +574,7 @@ int swsusp_read(unsigned int *flags_p)
error = load_image(&handle, &snapshot, header->pages - 1);
release_swap_reader(&handle);
- blkdev_put(resume_bdev);
+ blkdev_put(resume_bdev, FMODE_READ);
if (!error)
pr_debug("PM: Image successfully loaded\n");
@@ -609,7 +609,7 @@ int swsusp_check(void)
return -EINVAL;
}
if (error)
- blkdev_put(resume_bdev);
+ blkdev_put(resume_bdev, FMODE_READ);
else
pr_debug("PM: Signature found, resuming\n");
} else {
@@ -633,7 +633,7 @@ void swsusp_close(void)
return;
}
- blkdev_put(resume_bdev);
+ blkdev_put(resume_bdev, 0); /* move up */
}
static int swsusp_header_init(void)