[PATCH 2/3] md raid1: make first_clone a bool
From: heinzm
Date: Thu Aug 10 2023 - 08:12:19 EST
From: heinzm <heinzm@xxxxxxxxxx>
first_clone is used as a bool so make it one.
Signed-off-by: heinzm <heinzm@xxxxxxxxxx>
---
drivers/md/raid1.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c
index 913cd46b786b..0aed74efd758 100644
--- a/drivers/md/raid1.c
+++ b/drivers/md/raid1.c
@@ -1337,9 +1337,8 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
struct bitmap *bitmap = mddev->bitmap;
unsigned long flags;
struct md_rdev *blocked_rdev;
- int first_clone;
int max_sectors;
- bool write_behind = false;
+ bool first_clone, write_behind = false;
if (mddev_is_clustered(mddev) &&
md_cluster_ops->area_resyncing(mddev, WRITE,
@@ -1505,7 +1504,7 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
atomic_set(&r1_bio->remaining, 1);
atomic_set(&r1_bio->behind_remaining, 0);
- first_clone = 1;
+ first_clone = true;
for (i = 0; i < disks; i++) {
struct bio *mbio = NULL;
@@ -1528,7 +1527,7 @@ static void raid1_write_request(struct mddev *mddev, struct bio *bio,
md_bitmap_startwrite(bitmap, r1_bio->sector, r1_bio->sectors,
test_bit(R1BIO_BehindIO, &r1_bio->state));
- first_clone = 0;
+ first_clone = false;
}
if (r1_bio->behind_master_bio) {
--
2.41.0