]> git.baikalelectronics.ru Git - kernel.git/commit
writeback: fix possible bdi writeback refcounting problem
authorNick Piggin <npiggin@suse.de>
Tue, 15 Sep 2009 19:37:55 +0000 (21:37 +0200)
committerJens Axboe <jens.axboe@oracle.com>
Wed, 16 Sep 2009 13:18:53 +0000 (15:18 +0200)
commit76c4f9c4ef1182aba4ce0dc4094e5bcb9cd155d8
tree69c570a78f37760ead0c8cad2eda25991c3fcd4c
parent22253cccebe6a6614670151fa9760df802d7287e
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: Nick Piggin <npiggin@suse.de>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
fs/fs-writeback.c