-
Eric Wheeler authored
[ Upstream commit 07cc6ef8 ] 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> Cc: <stable@vger.kernel.org> Signed-off-by:
Jens Axboe <axboe@fb.com> Signed-off-by:
Sasha Levin <sasha.levin@oracle.com>
c2f87b5d