]> git.karo-electronics.de Git - linux-beck.git/commitdiff
md/raid10: minor code improvement in fix_read_error()
authorNeilBrown <neilb@suse.com>
Thu, 2 Jun 2016 06:19:52 +0000 (16:19 +1000)
committerShaohua Li <shli@fb.com>
Mon, 13 Jun 2016 18:54:16 +0000 (11:54 -0700)
rdev already holds conf->mirrors[d].rdev, so no need to load it again.

Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Shaohua Li <shli@fb.com>
drivers/md/raid10.c

index e644f6f5c4a7722bb3f344f1a0d84987a8141733..7a8bfe2196c9b4e23c79244fc163de8a5f0eab30 100644 (file)
@@ -2262,7 +2262,7 @@ static void fix_read_error(struct r10conf *conf, struct mddev *mddev, struct r10
                printk(KERN_NOTICE
                       "md/raid10:%s: %s: Failing raid device\n",
                       mdname(mddev), b);
-               md_error(mddev, conf->mirrors[d].rdev);
+               md_error(mddev, rdev);
                r10_bio->devs[r10_bio->read_slot].bio = IO_BLOCKED;
                return;
        }