]> git.baikalelectronics.ru Git - kernel.git/commit
md: simplify some 'if' conditionals in raid5_start_reshape.
authorNeilBrown <neilb@suse.de>
Mon, 31 Jan 2011 00:57:43 +0000 (11:57 +1100)
committerNeilBrown <neilb@suse.de>
Mon, 31 Jan 2011 00:57:43 +0000 (11:57 +1100)
commitbb3c37e1b550a8c7e2f5516505f2804882746793
tree6719ef774c0e1a719b0365eae457c8ba4f130c70
parent15a9c4f678d6b30fa64da3e61a93800c44f5d769
md: simplify some 'if' conditionals in raid5_start_reshape.

There are two consecutive 'if' statements.

 if (mddev->delta_disks >= 0)
      ....
 if (mddev->delta_disks > 0)

The code in the second is equally valid if delta_disks == 0, and these
two statements are the only place that 'added_devices' is used.

So make them a single if statement, make added_devices a local
variable, and re-indent it all.

No functional change.

Signed-off-by: NeilBrown <neilb@suse.de>
drivers/md/raid5.c