]> git.baikalelectronics.ru Git - kernel.git/commit
bdi: explain the dirty list transferring in bdi_destroy()
authorTejun Heo <tj@kernel.org>
Sun, 7 Sep 2014 23:04:00 +0000 (08:04 +0900)
committerJens Axboe <axboe@fb.com>
Mon, 8 Sep 2014 16:00:41 +0000 (10:00 -0600)
commit32f4747f511db2eb0099b826e19a78cf75ebed4f
treeade41fb1306d5efdb2868e4998926a2845c3274f
parent4490dff0f9dd9caa6412abb05b32815e7b018a52
bdi: explain the dirty list transferring in bdi_destroy()

bdi_destroy() has code to transfer the remaining dirty inodes to the
default_backing_dev_info; however, given the shutdown sequence, it
isn't clear how such condition would happen.  Also, it isn't a full
solution as the transferred inodes stlil point to the bdi which is
being destroyed.  Operations on those inodes can end up accessing
already released fields such as the percpu stat fields.

Digging through the history, it seems that the code was added as a
quick workaround for a bug report without fully root-causing the
issue.  We probably want to remove the code in time but for now let's
add a comment noting that it is a quick workaround.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <axboe@fb.com>
mm/backing-dev.c