diff options
author | Mike Snitzer <snitzer@redhat.com> | 2010-03-05 21:32:24 -0500 |
---|---|---|
committer | Alasdair G Kergon <agk@redhat.com> | 2010-03-05 21:32:24 -0500 |
commit | 0f3649a9e305ea22eb196a84a2d7520afcaa6060 (patch) | |
tree | 10e5c845bcb2af0c5d9a7d79b231474983500a60 /drivers | |
parent | ede5ea0b8b815560dc54c712536fdf0b456b6ad0 (diff) |
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: Dave Wysochanski <dwysocha@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Cc: stable@kernel.org
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/dm-ioctl.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c index 1d669322b27c..e3cf5686d0aa 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c | |||
@@ -897,16 +897,17 @@ static int do_resume(struct dm_ioctl *param) | |||
897 | set_disk_ro(dm_disk(md), 1); | 897 | set_disk_ro(dm_disk(md), 1); |
898 | } | 898 | } |
899 | 899 | ||
900 | if (dm_suspended_md(md)) | 900 | if (dm_suspended_md(md)) { |
901 | r = dm_resume(md); | 901 | r = dm_resume(md); |
902 | if (!r) | ||
903 | dm_kobject_uevent(md, KOBJ_CHANGE, param->event_nr); | ||
904 | } | ||
902 | 905 | ||
903 | if (old_map) | 906 | if (old_map) |
904 | dm_table_destroy(old_map); | 907 | dm_table_destroy(old_map); |
905 | 908 | ||
906 | if (!r) { | 909 | if (!r) |
907 | dm_kobject_uevent(md, KOBJ_CHANGE, param->event_nr); | ||
908 | r = __dev_status(md, param); | 910 | r = __dev_status(md, param); |
909 | } | ||
910 | 911 | ||
911 | dm_put(md); | 912 | dm_put(md); |
912 | return r; | 913 | return r; |