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
Kirill Smelkov
linux
Commits
d9a704ee
Commit
d9a704ee
authored
May 23, 2002
by
Linus Torvalds
Browse files
Options
Browse Files
Download
Plain Diff
Merge
parents
71363c48
ce922a4c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
18 deletions
+7
-18
drivers/ide/ide-disk.c
drivers/ide/ide-disk.c
+0
-1
fs/reiserfs/journal.c
fs/reiserfs/journal.c
+3
-6
kernel/suspend.c
kernel/suspend.c
+4
-11
No files found.
drivers/ide/ide-disk.c
View file @
d9a704ee
...
...
@@ -27,7 +27,6 @@
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/ide.h>
#include <linux/suspend.h>
#include <linux/buffer_head.h>
/* for invalidate_bdev() */
#include <asm/byteorder.h>
...
...
fs/reiserfs/journal.c
View file @
d9a704ee
...
...
@@ -1902,12 +1902,9 @@ static int reiserfs_journal_commit_thread(void *nullp) {
break
;
}
wake_up
(
&
reiserfs_commit_thread_done
)
;
#ifdef CONFIG_SOFTWARE_SUSPEND
if
(
current
->
flags
&
PF_FREEZE
)
{
refrigerator
(
PF_IOTHREAD
);
}
else
#endif
interruptible_sleep_on_timeout
(
&
reiserfs_commit_thread_wait
,
5
*
HZ
)
;
if
(
current
->
flags
&
PF_FREEZE
)
refrigerator
(
PF_IOTHREAD
);
interruptible_sleep_on_timeout
(
&
reiserfs_commit_thread_wait
,
5
*
HZ
)
;
}
unlock_kernel
()
;
wake_up
(
&
reiserfs_commit_thread_done
)
;
...
...
kernel/suspend.c
View file @
d9a704ee
...
...
@@ -404,15 +404,12 @@ static void lock_swapdevices(void) /* This is called after saving image so modif
swap_list_lock
();
for
(
i
=
0
;
i
<
MAX_SWAPFILES
;
i
++
)
if
(
swapfile_used
[
i
]
==
SWAPFILE_IGNORED
)
{
// PRINTS( "device %s locked\n", swap_info[i].swap_file->d_name.name );
swap_info
[
i
].
flags
^=
0xFF
;
/* we make the device unusable. A new call to
lock_swapdevices can unlock the devices. */
}
swap_list_unlock
();
}
kdev_t
suspend_device
;
static
int
write_suspend_image
(
void
)
{
int
i
;
...
...
@@ -420,6 +417,7 @@ static int write_suspend_image(void)
int
nr_pgdir_pages
=
SUSPEND_PD_PAGES
(
nr_copy_pages
);
union
diskpage
*
cur
,
*
buffer
=
(
union
diskpage
*
)
get_free_page
(
GFP_ATOMIC
);
unsigned
long
address
;
kdev_t
suspend_device
;
PRINTS
(
"Writing data to swap (%d pages): "
,
nr_copy_pages
);
for
(
i
=
0
;
i
<
nr_copy_pages
;
i
++
)
{
...
...
@@ -838,13 +836,9 @@ static void do_magic_suspend_1(void)
static
void
do_magic_suspend_2
(
void
)
{
read_swapfiles
();
if
(
!
suspend_save_image
())
{
#if 1
suspend_power_down
();
/* FIXME: if suspend_power_down is commented out, console is lost after few suspends ?! */
#endif
}
if
(
!
suspend_save_image
())
suspend_power_down
();
/* FIXME: if suspend_power_down is commented out, console is lost after few suspends ?! */
suspend_device
=
NODEV
;
printk
(
KERN_WARNING
"%sSuspend failed, trying to recover...
\n
"
,
name_suspend
);
MDELAY
(
1000
);
/* So user can wait and report us messages if armageddon comes :-) */
...
...
@@ -883,9 +877,8 @@ void do_software_suspend(void)
* We sync here -- so you have consistent filesystem state when things go wrong.
* -- so that noone writes to disk after we do atomic copy of data.
*/
PRINTS
(
"Syncing disks before copy
\n
"
);
PRINTS
(
"Syncing disks before copy
\n
"
);
do_suspend_sync
();
drivers_suspend
();
if
(
drivers_suspend
()
==
0
)
do_magic
(
0
);
/* This function returns after machine woken up from resume */
PRINTR
(
"Restarting processes...
\n
"
);
...
...
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