diff options
author | Jiri Slaby <jslaby@suse.cz> | 2010-04-10 16:28:56 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2010-04-10 16:28:56 -0400 |
commit | d88d4050dcaf09e417aaa9a5024dd9449ef71b2e (patch) | |
tree | 5156b4821fdb1a3c13cb9577c93b2eb6acb48814 /kernel | |
parent | 0eddb519b9127c73d53db4bf3ec1d45b13f844d1 (diff) |
PM / Hibernate: user.c, fix SNAPSHOT_SET_SWAP_AREA handling
When CONFIG_DEBUG_BLOCK_EXT_DEVT is set we decode the device
improperly by old_decode_dev and it results in an error while
hibernating with s2disk.
All users already pass the new device number, so switch to
new_decode_dev().
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Reported-and-tested-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: "Rafael J. Wysocki" <rjw@sisk.pl>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/power/user.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/power/user.c b/kernel/power/user.c index 4d2289626a84..a8c96212bc1b 100644 --- a/kernel/power/user.c +++ b/kernel/power/user.c | |||
@@ -420,7 +420,7 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd, | |||
420 | * User space encodes device types as two-byte values, | 420 | * User space encodes device types as two-byte values, |
421 | * so we need to recode them | 421 | * so we need to recode them |
422 | */ | 422 | */ |
423 | swdev = old_decode_dev(swap_area.dev); | 423 | swdev = new_decode_dev(swap_area.dev); |
424 | if (swdev) { | 424 | if (swdev) { |
425 | offset = swap_area.offset; | 425 | offset = swap_area.offset; |
426 | data->swap = swap_type_of(swdev, offset, NULL); | 426 | data->swap = swap_type_of(swdev, offset, NULL); |