diff options
| author | Vladimir Davydov <[email protected]> | 2014-01-23 15:52:55 -0800 |
|---|---|---|
| committer | Linus Torvalds <[email protected]> | 2014-01-23 16:36:50 -0800 |
| commit | 3965fc3652244651006ebb31c8c45318ce84818f (patch) | |
| tree | 6ab0e736387b7694d874809ff4b8e9b463461f28 /tools/perf/scripts/python | |
| parent | 309381feaee564281c3d9e90fbca8963bb7428ad (diff) | |
slab: clean up kmem_cache_create_memcg() error handling
Currently kmem_cache_create_memcg() backoffs on failure inside
conditionals, without using gotos. This results in the rollback code
duplication, which makes the function look cumbersome even though on
error we should only free the allocated cache. Since in the next patch
I am going to add yet another rollback function call on error path
there, let's employ labels instead of conditionals for undoing any
changes on failure to keep things clean.
Signed-off-by: Vladimir Davydov <[email protected]>
Reviewed-by: Pekka Enberg <[email protected]>
Cc: Michal Hocko <[email protected]>
Cc: Glauber Costa <[email protected]>
Cc: Johannes Weiner <[email protected]>
Cc: Christoph Lameter <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions