提交 d88d4050 编写于 作者: J Jiri Slaby 提交者: Rafael J. Wysocki

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: NJiri Slaby <jslaby@suse.cz>
Reported-and-tested-by: NJiri Kosina <jkosina@suse.cz>
Signed-off-by: N"Rafael J. Wysocki" <rjw@sisk.pl>
上级 0eddb519
......@@ -420,7 +420,7 @@ static long snapshot_ioctl(struct file *filp, unsigned int cmd,
* User space encodes device types as two-byte values,
* so we need to recode them
*/
swdev = old_decode_dev(swap_area.dev);
swdev = new_decode_dev(swap_area.dev);
if (swdev) {
offset = swap_area.offset;
data->swap = swap_type_of(swdev, offset, NULL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册