]> git.ipfire.org Git - thirdparty/mdadm.git/commitdiff
DDF: remove 'FIXME' comment that doesn't need fixing.
authorNeilBrown <neilb@suse.de>
Wed, 21 May 2014 03:50:52 +0000 (13:50 +1000)
committerNeilBrown <neilb@suse.de>
Wed, 21 May 2014 03:50:52 +0000 (13:50 +1000)
It appears this is correct, though for consistency with elsewhere
we check that pdnum is not negative.

Signed-off-by: NeilBrown <neilb@suse.de>
super-ddf.c

index 607f1ea17555aa2f87c4c77723cb3a31951d0c09..e78e138501918ecfcd65451c1f82a5a7dae40e4c 100644 (file)
@@ -4403,8 +4403,9 @@ static void ddf_set_disk(struct active_array *a, int n, int state)
                dprintf("%s: array %u disk %u ref %08x pd %d\n",
                        __func__, inst, n_bvd,
                        be32_to_cpu(vc->phys_refnum[n_bvd]), pd);
-               if ((state & DS_INSYNC) && ! (state & DS_FAULTY)) {
-                       pd = dl->pdnum; /* FIXME: is this really correct ? */
+               if ((state & DS_INSYNC) && ! (state & DS_FAULTY) &&
+                   dl->pdnum >= 0) {
+                       pd = dl->pdnum;
                        vc->phys_refnum[n_bvd] = dl->disk.refnum;
                        LBA_OFFSET(ddf, vc)[n_bvd] =
                                cpu_to_be64(mdi->data_offset);