[PATCH resend] bcache: prevent crash on changing writeback_running

From: Stefan Bader
Date: Fri Jul 10 2015 - 10:11:11 EST


I sent this out quite a while ago. Back then it was said that it
was applied to the development tree. But it seems it never made its
way upstream.
I re-tested with a 4.0.7 kernel and compared this against a 4.0 kernel
with this patch applied. Still it is possible to trigger a NULL pointer
violation when writing 0 into writeback_running of a bcache device that
is not attached to a cache set (without the patch).

-Stefan


---