diff options
| author | Ingo Molnar <mingo@elte.hu> | 2009-02-11 04:17:42 -0500 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2009-02-11 04:17:42 -0500 |
| commit | f437e8b53eab92a5829e65781e29aed23d8ffd0c (patch) | |
| tree | 48982c8818a4ac5cddb84ca6a1d55620eb9680ee /drivers/md/linear.c | |
| parent | 140573d33b703194b7e1893711e78b7f546cca7c (diff) | |
| parent | 8e4921515c1a379539607eb443d51c30f4f7f338 (diff) | |
Merge commit 'v2.6.29-rc4' into sched/core
Diffstat (limited to 'drivers/md/linear.c')
| -rw-r--r-- | drivers/md/linear.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/md/linear.c b/drivers/md/linear.c index 1e3aea9eecf1..09658b218474 100644 --- a/drivers/md/linear.c +++ b/drivers/md/linear.c | |||
| @@ -25,13 +25,13 @@ static inline dev_info_t *which_dev(mddev_t *mddev, sector_t sector) | |||
| 25 | { | 25 | { |
| 26 | dev_info_t *hash; | 26 | dev_info_t *hash; |
| 27 | linear_conf_t *conf = mddev_to_conf(mddev); | 27 | linear_conf_t *conf = mddev_to_conf(mddev); |
| 28 | sector_t idx = sector >> conf->sector_shift; | ||
| 28 | 29 | ||
| 29 | /* | 30 | /* |
| 30 | * sector_div(a,b) returns the remainer and sets a to a/b | 31 | * sector_div(a,b) returns the remainer and sets a to a/b |
| 31 | */ | 32 | */ |
| 32 | sector >>= conf->sector_shift; | 33 | (void)sector_div(idx, conf->spacing); |
| 33 | (void)sector_div(sector, conf->spacing); | 34 | hash = conf->hash_table[idx]; |
| 34 | hash = conf->hash_table[sector]; | ||
| 35 | 35 | ||
| 36 | while (sector >= hash->num_sectors + hash->start_sector) | 36 | while (sector >= hash->num_sectors + hash->start_sector) |
| 37 | hash++; | 37 | hash++; |
