dm thin: inverted down_trylock() test
Subsystems (3)
PATCH 1/1 dm thin: inverted down_trylock() test
down_trylock() is the opposite of mutex_trylock(). It returns zero on success and one on failure.
Fixes f4ef95631ebf ('dm thin: do not run the worker thread if pool is suspended')
Signed-off-by Dan Carpenter <[email protected]>
drivers/md/dm-thin.c +1 -1
@@ -237,7 +237,7 @@ struct thin_c {*/ static void wake_worker (struct pool *pool) { -if (down_trylock (&pool->queue_work_lock)) { +if (!down_trylock (&pool->queue_work_lock)) {queue_work (pool->wq, &pool->worker);up (&pool->queue_work_lock); }
Quoted 5 lines · Dan Carpenter
down_trylock()is the opposite ofmutex_trylock(). It returns zero on success and one on failure.Fixes f4ef95631ebf ('dm thin: do not run the worker thread if pool is suspended')Signed-off-by Dan Carpenter <[email protected]>
Thanks for the fix, but that commit has since been dropped.