Skip to content
Commit 1ef7d9aa authored by Nicholas Piggin's avatar Nicholas Piggin Committed by Jens Axboe
Browse files

writeback: fix possible bdi writeback refcounting problem



wb_clear_pending AFAIKS should not be called after the item has been
put on the list, except by the worker threads. It could lead to the
situation where the refcount is decremented below 0 and cause lots of
problems.

Presumably the !wb_has_dirty_io case is not a common one, so it can
be discovered when the thread wakes up to check?

Also add a comment in bdi_work_clear.

Signed-off-by: default avatarNick Piggin <npiggin@suse.de>
Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent 77b9d059
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment