aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorMike Snitzer <snitzer@redhat.com>2010-03-06 02:32:24 +0000
committerAlasdair G Kergon <agk@redhat.com>2010-03-06 02:32:24 +0000
commit0f3649a9e305ea22eb196a84a2d7520afcaa6060 (patch)
tree10e5c845bcb2af0c5d9a7d79b231474983500a60 /drivers/md
parentede5ea0b8b815560dc54c712536fdf0b456b6ad0 (diff)
downloadkernel_samsung_smdk4412-0f3649a9e305ea22eb196a84a2d7520afcaa6060.zip
kernel_samsung_smdk4412-0f3649a9e305ea22eb196a84a2d7520afcaa6060.tar.gz
kernel_samsung_smdk4412-0f3649a9e305ea22eb196a84a2d7520afcaa6060.tar.bz2
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/md')
-rw-r--r--drivers/md/dm-ioctl.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
index 1d66932..e3cf568 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)
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;