Re: [PATCH RESEND] raid5: fix duplicate checks for rdev->saved_raid_disk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Song.

在 2022/7/17 13:31, Song Liu 写道:
On Fri, Jul 15, 2022 at 8:11 PM Jackie Liu <liu.yun@xxxxxxxxx> wrote:

From: Jackie Liu <liuyun01@xxxxxxxxxx>

'first' will always be greater than or equal to 0, it is unnecessary to
repeat the 0 check, clean it up.

Signed-off-by: Jackie Liu <liuyun01@xxxxxxxxxx>

This looks identical to the original version. Which branch is this based on?

I based on linux.git/v5.19-rc7, it's linus tree.

Please rebase on top of md-next branch and resend the patch:

https://git.kernel.org/pub/scm/linux/kernel/git/song/md.git/log/?h=md-next

Sure. will send new patch base this branch.


Thanks,
Song

---
  drivers/md/raid5.c | 3 +--
  1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 20e53b167f81..a0b38a0ea9c3 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -8063,8 +8063,7 @@ static int raid5_add_disk(struct mddev *mddev, struct md_rdev *rdev)
          * find the disk ... but prefer rdev->saved_raid_disk
          * if possible.
          */
-       if (rdev->saved_raid_disk >= 0 &&
-           rdev->saved_raid_disk >= first &&
+       if (rdev->saved_raid_disk >= first &&
             rdev->saved_raid_disk <= last &&
             conf->disks[rdev->saved_raid_disk].rdev == NULL)
                 first = rdev->saved_raid_disk;
--
2.25.1




[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux