]> git.baikalelectronics.ru Git - kernel.git/commit
bcache: disassemble the big if() checks in bch_cache_set_alloc()
authorColy Li <colyli@suse.de>
Sat, 25 Jul 2020 12:00:25 +0000 (20:00 +0800)
committerJens Axboe <axboe@kernel.dk>
Sat, 25 Jul 2020 13:38:20 +0000 (07:38 -0600)
commit133f7f5daf0bce33a68a3d473270c3d67c8f8a89
tree36ec7e85c90c187c2a6c1bfbb6984a43fa283e69
parent1765d801f123c7c384bdb79c21a4c2d1c5635db7
bcache: disassemble the big if() checks in bch_cache_set_alloc()

In bch_cache_set_alloc() there is a big if() checks combined by 11 items
together. When this big if() statement fails, it is difficult to tell
exactly which item fails indeed.

This patch disassembles this big if() checks into 11 single if() checks,
which makes code debug more easier.

Signed-off-by: Coly Li <colyli@suse.de>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/md/bcache/super.c