diff options
author | Eric Wheeler <git@linux.ewheeler.net> | 2016-02-26 23:39:06 +0100 |
---|---|---|
committer | Jens Axboe <axboe@fb.com> | 2016-03-08 17:17:30 +0100 |
commit | 07cc6ef8edc47f8b4fc1e276d31127a0a5863d4d (patch) | |
tree | f70c53b8aa72129040a75222086ed6590d63bd3e /drivers/md/raid5.c | |
parent | NVMe: Create discard zero quirk white list (diff) | |
download | linux-07cc6ef8edc47f8b4fc1e276d31127a0a5863d4d.tar.xz linux-07cc6ef8edc47f8b4fc1e276d31127a0a5863d4d.zip |
bcache: fix race of writeback thread starting before complete initialization
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>
Diffstat (limited to 'drivers/md/raid5.c')
0 files changed, 0 insertions, 0 deletions