return 0;
}
-/*
- * This is our sync function. With this solution we probably won't sleep
- * but that should not be a problem since tasks are stopped..
- */
-
-static inline void do_suspend_sync(void)
-{
- blk_run_queues();
-#warning This might be broken. We need to somehow wait for data to reach the disk
-}
-
/* We memorize in swapfile_used what swap devices are used for suspension */
#define SWAPFILE_UNUSED 0
#define SWAPFILE_SUSPEND 1 /* This is the suspending device */
free_some_memory();
- /* No need to invalidate any vfsmnt list -- they will be valid after resume, anyway.
- *
- * 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.
+ /* No need to invalidate any vfsmnt list --
+ * they will be valid after resume, anyway.
*/
- PRINTK("Syncing disks before copy\n");
- do_suspend_sync();
+ blk_run_queues();
/* Save state of all device drivers, and stop them. */
if(drivers_suspend()==0)
return;
software_suspend_enabled = 0;
- BUG_ON(in_interrupt());
+ might_sleep();
do_software_suspend();
}