diff options
author | Nikolay Borisov <[email protected]> | 2016-09-10 23:06:17 +0300 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-09-12 12:40:03 -0700 |
commit | 67d60824946ade6b1b71a98dbfbfca5949aee425 (patch) | |
tree | f55cb2ea00ca84d5b35a2a3e9b83ca1fe6d0313a /module/zfs/arc.c | |
parent | 20aa7a4e319ddf53e4e2dcc5fa9b3b1645e982e3 (diff) |
Refactor spa_load_l2cache to make build happy
In case sav->sav_config was NULL the body of the function
would skip the iteration of the l2 cache devices and will
just cleanup the old devices. However, this wasn't very obvious
since the null check was performed after the loop body and after
the old devices were cleaned. Refactor the code so that it's now
obvious when the iteration of the l2cache devices is skipped.
This fixes the following cppcheck warning:
[module/zfs/spa.c:1552]: (error) Possible null pointer dereference: newvdevs
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Nikolay Borisov <[email protected]>
Closes #5087
Diffstat (limited to 'module/zfs/arc.c')
0 files changed, 0 insertions, 0 deletions