summaryrefslogtreecommitdiffstats
path: root/drivers/md/raid5.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2009-05-27 13:39:05 +0200
committerNeilBrown <neilb@suse.de>2009-05-27 13:39:05 +0200
commited37d83e6aa218192fb28bb6b82498d2a8c74070 (patch)
treebfa8462c7be84539deae430355228305e5516a7a /drivers/md/raid5.c
parentmd: don't use locked_ioctl. (diff)
downloadlinux-ed37d83e6aa218192fb28bb6b82498d2a8c74070.tar.xz
linux-ed37d83e6aa218192fb28bb6b82498d2a8c74070.zip
md: raid5: change incorrect usage of 'min' macro to 'min_t'
A recent patch to raid5.c use min on an int and a sector_t. This isn't allowed. So change it to min_t(sector_t,x,y). Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/raid5.c')
-rw-r--r--drivers/md/raid5.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/raid5.c b/drivers/md/raid5.c
index 3c3626d2a1f9..5d400aef8d9b 100644
--- a/drivers/md/raid5.c
+++ b/drivers/md/raid5.c
@@ -3811,13 +3811,13 @@ static sector_t reshape_request(mddev_t *mddev, sector_t sector_nr, int *skipped
safepos = conf->reshape_safe;
sector_div(safepos, data_disks);
if (mddev->delta_disks < 0) {
- writepos -= min(reshape_sectors, writepos);
+ writepos -= min_t(sector_t, reshape_sectors, writepos);
readpos += reshape_sectors;
safepos += reshape_sectors;
} else {
writepos += reshape_sectors;
- readpos -= min(reshape_sectors, readpos);
- safepos -= min(reshape_sectors, safepos);
+ readpos -= min_t(sector_t, reshape_sectors, readpos);
+ safepos -= min_t(sector_t, reshape_sectors, safepos);
}
/* 'writepos' is the most advanced device address we might write.