]> git.baikalelectronics.ru Git - kernel.git/commit
block: fix lockdep warning on io_context release put_io_context()
authorTejun Heo <tj@kernel.org>
Sat, 11 Feb 2012 11:37:25 +0000 (12:37 +0100)
committerJens Axboe <axboe@kernel.dk>
Sat, 11 Feb 2012 11:37:25 +0000 (12:37 +0100)
commite04c34bf15c960b5d5346ead87f406308ca219b7
tree1aed7dc560df36157d8cde6fdebc1d86f4ed61ad
parent00a5580d48bffddba19a17e0ea03ff71fb1e005c
block: fix lockdep warning on io_context release put_io_context()

0f0b66b64f "block: strip out locking optimization in put_io_context()"
removed ioc_lock depth lockdep annoation along with locking
optimization; however, while recursing from put_io_context() is no
longer possible, ioc_release_fn() may still end up putting the last
reference of another ioc through elevator, which wlil grab ioc->lock
triggering spurious (as the ioc is always different one) A-A deadlock
warning.

As this can only happen one time from ioc_release_fn(), using non-zero
subclass from ioc_release_fn() is enough.  Use subclass 1.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/blk-ioc.c