~ubuntu-branches/ubuntu/quantal/linux-lowlatency/quantal

« back to all changes in this revision

Viewing changes to kernel/power/user.c

  • Committer: Package Import Robot
  • Author(s): Alessio Igor Bogani
  • Date: 2011-10-26 11:13:05 UTC
  • Revision ID: package-import@ubuntu.com-20111026111305-04kado7d1u2er2rl
Tags: 3.2.0-16.25
Add new lowlatency kernel flavour

Show diffs side-by-side

added added

removed removed

Lines of Context:
283
283
                }
284
284
                pm_restore_gfp_mask();
285
285
                error = hibernation_snapshot(data->platform_support);
286
 
                if (!error)
 
286
                if (error) {
 
287
                        thaw_kernel_threads();
 
288
                } else {
287
289
                        error = put_user(in_suspend, (int __user *)arg);
288
 
                if (!error)
289
 
                        data->ready = 1;
 
290
                        if (!error && !freezer_test_done)
 
291
                                data->ready = 1;
 
292
                        if (freezer_test_done) {
 
293
                                freezer_test_done = false;
 
294
                                thaw_kernel_threads();
 
295
                        }
 
296
                }
290
297
                break;
291
298
 
292
299
        case SNAPSHOT_ATOMIC_RESTORE:
303
310
                swsusp_free();
304
311
                memset(&data->handle, 0, sizeof(struct snapshot_handle));
305
312
                data->ready = 0;
 
313
                /*
 
314
                 * It is necessary to thaw kernel threads here, because
 
315
                 * SNAPSHOT_CREATE_IMAGE may be invoked directly after
 
316
                 * SNAPSHOT_FREE.  In that case, if kernel threads were not
 
317
                 * thawed, the preallocation of memory carried out by
 
318
                 * hibernation_snapshot() might run into problems (i.e. it
 
319
                 * might fail or even deadlock).
 
320
                 */
 
321
                thaw_kernel_threads();
306
322
                break;
307
323
 
308
324
        case SNAPSHOT_SET_IMAGE_SIZE: