Commit 54726f14 authored by Linus Torvalds's avatar Linus Torvalds

Merge branch 'for-linus' of git://neil.brown.name/md

* 'for-linus' of git://neil.brown.name/md:
  md: raid5: change incorrect usage of 'min' macro to 'min_t'
parents 8784cdd9 ed37d83e
...@@ -3811,13 +3811,13 @@ static sector_t reshape_request(mddev_t *mddev, sector_t sector_nr, int *skipped ...@@ -3811,13 +3811,13 @@ static sector_t reshape_request(mddev_t *mddev, sector_t sector_nr, int *skipped
safepos = conf->reshape_safe; safepos = conf->reshape_safe;
sector_div(safepos, data_disks); sector_div(safepos, data_disks);
if (mddev->delta_disks < 0) { if (mddev->delta_disks < 0) {
writepos -= min(reshape_sectors, writepos); writepos -= min_t(sector_t, reshape_sectors, writepos);
readpos += reshape_sectors; readpos += reshape_sectors;
safepos += reshape_sectors; safepos += reshape_sectors;
} else { } else {
writepos += reshape_sectors; writepos += reshape_sectors;
readpos -= min(reshape_sectors, readpos); readpos -= min_t(sector_t, reshape_sectors, readpos);
safepos -= min(reshape_sectors, safepos); safepos -= min_t(sector_t, reshape_sectors, safepos);
} }
/* 'writepos' is the most advanced device address we might write. /* 'writepos' is the most advanced device address we might write.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment