提交 0f3649a9 编写于 作者: M Mike Snitzer 提交者: Alasdair G Kergon

dm ioctl: only issue uevent on resume if state changed

Only issue a uevent on a resume if the state of the device changed,
i.e. if it was suspended and/or its table was replaced.
Signed-off-by: NDave Wysochanski <dwysocha@redhat.com>
Signed-off-by: NMike Snitzer <snitzer@redhat.com>
Cc: stable@kernel.org
Signed-off-by: NAlasdair G Kergon <agk@redhat.com>
上级 ede5ea0b
......@@ -897,16 +897,17 @@ static int do_resume(struct dm_ioctl *param)
set_disk_ro(dm_disk(md), 1);
}
if (dm_suspended_md(md))
if (dm_suspended_md(md)) {
r = dm_resume(md);
if (!r)
dm_kobject_uevent(md, KOBJ_CHANGE, param->event_nr);
}
if (old_map)
dm_table_destroy(old_map);
if (!r) {
dm_kobject_uevent(md, KOBJ_CHANGE, param->event_nr);
if (!r)
r = __dev_status(md, param);
}
dm_put(md);
return r;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册