diff options
author | NeilBrown <neilb@suse.de> | 2014-08-18 06:38:45 +0200 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2014-08-19 09:20:27 +0200 |
commit | cb8b12b5d81cf8522076f99a90bc3b795825c3b3 (patch) | |
tree | 64adaf3e9ef304cf078e9c64940a0c24a44641b4 /fs/f2fs/gc.h | |
parent | md/raid10: avoid memory leak on error path during reshape. (diff) | |
download | linux-cb8b12b5d81cf8522076f99a90bc3b795825c3b3.tar.xz linux-cb8b12b5d81cf8522076f99a90bc3b795825c3b3.zip |
md/raid10: always initialise ->state on newly allocated r10_bio
Most places which allocate an r10_bio zero the ->state, some don't.
As the r10_bio comes from a mempool, and the allocation function uses
kzalloc it is often zero anyway. But sometimes it isn't and it is
best to be safe.
I only noticed this because of the bug fixed by an earlier patch
where the r10_bios allocated for a reshape were left around to
be used by a subsequent resync. In that case the R10BIO_IsReshape
flag caused problems.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'fs/f2fs/gc.h')
0 files changed, 0 insertions, 0 deletions