lkml.org 
[lkml]   [2011]   [Nov]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] backing-dev: ensure wakeup_timer is deleted
On 2011-11-10 10:07, Linus Walleij wrote:
> diff --git a/mm/backing-dev.c b/mm/backing-dev.c
> index a086064..71034f4 100644
> --- a/mm/backing-dev.c
> +++ b/mm/backing-dev.c
> @@ -724,6 +724,14 @@ void bdi_destroy(struct backing_dev_info *bdi)
>
> bdi_unregister(bdi);
>
> + /*
> + * If bdi_unregister() had already been called earlier, the
> + * wakeup_timer could still be armed because bdi_prune_sb()
> + * can race with the bdi_wakeup_thread_delayed() calls from
> + * __mark_inode_dirty().
> + */
> + del_timer_sync(&bdi->wb.wakeup_timer);
> +
> for (i = 0; i < NR_BDI_STAT_ITEMS; i++)
> percpu_counter_destroy(&bdi->bdi_stat[i]);

Thanks, makes sense, applied.

--
Jens Axboe



\
 
 \ /
  Last update: 2011-11-11 13:31    [W:0.030 / U:0.160 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site