Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
c2dd0dae
Commit
c2dd0dae
authored
Oct 08, 2007
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] propagate mode through swsusp_close()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
30c40d2c
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
kernel/power/disk.c
kernel/power/disk.c
+1
-1
kernel/power/power.h
kernel/power/power.h
+1
-1
kernel/power/swap.c
kernel/power/swap.c
+3
-3
No files found.
kernel/power/disk.c
View file @
c2dd0dae
...
...
@@ -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
;
}
...
...
kernel/power/power.h
View file @
c2dd0dae
...
...
@@ -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 */
...
...
kernel/power/swap.c
View file @
c2dd0dae
...
...
@@ -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
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment