summaryrefslogtreecommitdiffstats
path: root/crypto/chacha20_generic.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.com>2015-07-15 17:24:17 +1000
committerNeilBrown <neilb@suse.com>2015-08-31 19:32:48 +0200
commit3cb5edf45457948347b5ae8cc9650c000cef4391 (patch)
tree26bd0c6546cd5658260af55402672b20294230f7 /crypto/chacha20_generic.c
parent5cac6bcb9312a18a5091976fc374b4c7b9c4ae2e (diff)
downloadblackbird-op-linux-3cb5edf45457948347b5ae8cc9650c000cef4391.tar.gz
blackbird-op-linux-3cb5edf45457948347b5ae8cc9650c000cef4391.zip
md/raid5: switch to use conf->chunk_sectors in place of mddev->chunk_sectors where possible
The chunk_sectors and new_chunk_sectors fields of mddev can be changed any time (via sysfs) that the reconfig mutex can be taken. So raid5 keeps internal copies in 'conf' which are stable except for a short locked moment when reshape stops/starts. So any access that does not hold reconfig_mutex should use the 'conf' values, not the 'mddev' values. Several don't. This could result in corruption if new values were written at awkward times. Also use min() or max() rather than open-coding. Signed-off-by: NeilBrown <neilb@suse.com>
Diffstat (limited to 'crypto/chacha20_generic.c')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud