diff options
| author | Eric Wheeler <git@linux.ewheeler.net> | 2016-02-26 14:39:06 -0800 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-04-12 09:08:53 -0700 |
| commit | b58e781068d9a5fd6b0ee77f595c3dbaa0d2b7aa (patch) | |
| tree | 0e598e2780aed5a4ce4a85d130d15423f900383e /include/linux/debugobjects.h | |
| parent | 32bb1185093c67c2280e440685ebc6b23fd47743 (diff) | |
bcache: fix race of writeback thread starting before complete initialization
commit 07cc6ef8edc47f8b4fc1e276d31127a0a5863d4d upstream.
The bch_writeback_thread might BUG_ON in read_dirty() if
dc->sb==BDEV_STATE_DIRTY and bch_sectors_dirty_init has not yet completed
its related initialization. This patch downs the dc->writeback_lock until
after initialization is complete, thus preventing bch_writeback_thread
from proceeding prematurely.
See this thread:
http://thread.gmane.org/gmane.linux.kernel.bcache.devel/3453
Signed-off-by: Eric Wheeler <bcache@linux.ewheeler.net>
Tested-by: Marc MERLIN <marc@merlins.org>
Signed-off-by: Jens Axboe <axboe@fb.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions
