mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 21:07:02 +09:00
dm ioctl: only issue uevent on resume if state changed
commit 0f3649a9e3 upstream.
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: Dave Wysochanski <dwysocha@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
f64089821b
commit
6c46bff05f
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user