From: Alexander Gordeev Date: Tue, 17 Jun 2014 20:37:23 +0000 (+0200) Subject: blk-mq: bitmap tag: fix races in bt_get() function X-Git-Tag: omap-for-v3.17/soc-cleanup~74^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86fb5c56cfa26de5e91c9a50e2767a695dff366e;p=pandora-kernel.git blk-mq: bitmap tag: fix races in bt_get() function This update fixes few issues in bt_get() function: - list_empty(&wait.task_list) check is not protected; - was_empty check is always true which results in *every* thread entering the loop resets bt_wait_state::wait_cnt counter rather than every bt->wake_cnt'th thread; - 'bt_wait_state::wait_cnt' counter update is redundant, since it also gets reset in bt_clear_tag() function; Cc: Christoph Hellwig Cc: Ming Lei Cc: Jens Axboe Signed-off-by: Alexander Gordeev Signed-off-by: Jens Axboe --- Reading git-diff-tree failed