aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/multipath.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2012-02-03 17:12:42 -0500
committerJiri Kosina <jkosina@suse.cz>2012-02-03 17:13:05 -0500
commit972c5ae961d6e5103e2b33d935cfa4145fd47140 (patch)
tree350b2a76b979ba8766c09838617df67ff330eca0 /drivers/md/multipath.c
parent5196d20305d5e30d871111d3a876cf067dd94255 (diff)
parent7c7ed8ec337bf5f62cc5287a6eb6b2f1b7504c2f (diff)
Merge branch 'master' into for-next
Sync with Linus' tree to be able to apply patch to a newer code (namely drivers/gpu/drm/gma500/psb_intel_lvds.c)
Diffstat (limited to 'drivers/md/multipath.c')
-rw-r--r--drivers/md/multipath.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/md/multipath.c b/drivers/md/multipath.c
index 5899246fa37e..a222f516660e 100644
--- a/drivers/md/multipath.c
+++ b/drivers/md/multipath.c
@@ -292,17 +292,16 @@ static int multipath_add_disk(struct mddev *mddev, struct md_rdev *rdev)
292 return err; 292 return err;
293} 293}
294 294
295static int multipath_remove_disk(struct mddev *mddev, int number) 295static int multipath_remove_disk(struct mddev *mddev, struct md_rdev *rdev)
296{ 296{
297 struct mpconf *conf = mddev->private; 297 struct mpconf *conf = mddev->private;
298 int err = 0; 298 int err = 0;
299 struct md_rdev *rdev; 299 int number = rdev->raid_disk;
300 struct multipath_info *p = conf->multipaths + number; 300 struct multipath_info *p = conf->multipaths + number;
301 301
302 print_multipath_conf(conf); 302 print_multipath_conf(conf);
303 303
304 rdev = p->rdev; 304 if (rdev == p->rdev) {
305 if (rdev) {
306 if (test_bit(In_sync, &rdev->flags) || 305 if (test_bit(In_sync, &rdev->flags) ||
307 atomic_read(&rdev->nr_pending)) { 306 atomic_read(&rdev->nr_pending)) {
308 printk(KERN_ERR "hot-remove-disk, slot %d is identified" 307 printk(KERN_ERR "hot-remove-disk, slot %d is identified"