Skip to content

Commit d88d405

Browse files
Jiri Slabyrjwysocki
authored andcommitted
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>
1 parent 0eddb51 commit d88d405

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎kernel/power/user.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd,
420420
* User space encodes device types as two-byte values,
421421
* so we need to recode them
422422
*/
423-
swdev = old_decode_dev(swap_area.dev);
423+
swdev = new_decode_dev(swap_area.dev);
424424
if (swdev) {
425425
offset = swap_area.offset;
426426
data->swap = swap_type_of(swdev, offset, NULL);

0 commit comments

Comments
 (0)