Files
linux/include/linux
Jan Kara bf0972039d bdi: avoid oops on device removal
commit 5acda9d12d upstream.

After commit 839a8e8660 ("writeback: replace custom worker pool
implementation with unbound workqueue") when device is removed while we
are writing to it we crash in bdi_writeback_workfn() ->
set_worker_desc() because bdi->dev is NULL.

This can happen because even though bdi_unregister() cancels all pending
flushing work, nothing really prevents new ones from being queued from
balance_dirty_pages() or other places.

Fix the problem by clearing BDI_registered bit in bdi_unregister() and
checking it before scheduling of any flushing work.

Fixes: 839a8e8660

Reviewed-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jan Kara <jack@suse.cz>
Cc: Derek Basehore <dbasehore@chromium.org>
Cc: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-04-26 17:15:35 -07:00
..
2013-05-17 14:31:05 -04:00
2013-07-25 14:07:23 -07:00
2013-12-04 10:56:22 -08:00
2013-05-07 19:46:02 -07:00
2013-03-23 16:11:31 -07:00
2013-12-08 07:29:27 -08:00
2013-05-01 16:36:22 +05:30
2013-03-28 10:10:25 -06:00
2013-07-28 16:30:11 -07:00
2013-05-07 18:38:27 -07:00
2013-04-29 18:28:40 -07:00
2013-10-13 16:08:28 -07:00
2014-04-03 12:01:05 -07:00
2013-07-28 16:30:05 -07:00
2013-04-30 17:04:06 -07:00
2013-04-01 11:04:50 -07:00
2013-04-30 17:04:00 -07:00
2013-10-13 16:08:35 -07:00
2014-04-03 12:01:05 -07:00
2013-07-21 18:21:29 -07:00
2014-01-15 15:28:47 -08:00
2013-05-04 14:47:26 -04:00
2013-04-29 15:54:28 -07:00
2013-05-28 11:05:08 +02:00
2014-02-13 13:47:59 -08:00
2013-04-29 15:54:28 -07:00
2013-04-12 10:26:23 +02:00
2013-04-09 14:13:29 -04:00
2013-03-29 15:31:30 -04:00
2013-04-30 15:50:12 +05:30
2013-08-20 08:43:02 -07:00
2013-03-28 11:10:22 -07:00
2013-07-28 16:29:55 -07:00