mirror of
https://github.com/team-infusion-developers/android_kernel_samsung_msm8976.git
synced 2024-10-31 18:09:19 +00:00
mm/backing-dev.c: reset bdi min_ratio in bdi_unregister()
Vito said: : The system has many usb disks coming and going day to day, with their : respective bdi's having min_ratio set to 1 when inserted. It works for : some time until eventually min_ratio can no longer be set, even when the : active set of bdi's seen in /sys/class/bdi/*/min_ratio doesn't add up to : anywhere near 100. : : This then leads to an unrelated starvation problem caused by write-heavy : fuse mounts being used atop the usb disks, a problem the min_ratio setting : at the underlying devices bdi effectively prevents. Fix this leakage by resetting the bdi min_ratio when unregistering the BDI. Signed-off-by: Peter Zijlstra <peterz@infradead.org> Reported-by: Vito Caputo <lkml@pengaru.com> Cc: Wu Fengguang <fengguang.wu@intel.com> Cc: Miklos Szeredi <miklos@szeredi.hu> Cc: <stable@kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
2b934c6236
commit
ccb6108f5b
1 changed files with 1 additions and 0 deletions
|
@ -606,6 +606,7 @@ static void bdi_prune_sb(struct backing_dev_info *bdi)
|
||||||
void bdi_unregister(struct backing_dev_info *bdi)
|
void bdi_unregister(struct backing_dev_info *bdi)
|
||||||
{
|
{
|
||||||
if (bdi->dev) {
|
if (bdi->dev) {
|
||||||
|
bdi_set_min_ratio(bdi, 0);
|
||||||
trace_writeback_bdi_unregister(bdi);
|
trace_writeback_bdi_unregister(bdi);
|
||||||
bdi_prune_sb(bdi);
|
bdi_prune_sb(bdi);
|
||||||
del_timer_sync(&bdi->wb.wakeup_timer);
|
del_timer_sync(&bdi->wb.wakeup_timer);
|
||||||
|
|
Loading…
Reference in a new issue