All of lore.kernel.org
 help / color / mirror / Atom feed
From: Wu Fengguang <fengguang.wu@intel.com>
To: Chanho Min <chanho0207@gmail.com>
Cc: Rabin Vincent <rabin@rab.in>, Jens Axboe <axboe@kernel.dk>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] mm/backing-dev.c: fix crash when USB/SCSI device is detached
Date: Mon, 16 Jan 2012 13:50:44 +0800	[thread overview]
Message-ID: <20120116055044.GA14857@localhost> (raw)
In-Reply-To: <CAOAMb1Av0w8ip+YyMm82_U3n3zt8DDrofOmvKR+_5ikDMcbYmQ@mail.gmail.com>

On Mon, Jan 16, 2012 at 02:28:30PM +0900, Chanho Min wrote:
> On Mon, Jan 16, 2012 at 11:53 AM, Wu Fengguang <fengguang.wu@intel.com> wrote:
> > On Sun, Jan 15, 2012 at 09:11:07PM +0530, Rabin Vincent wrote:
> >> On Sun, Jan 15, 2012 at 08:58:53PM +0800, Wu Fengguang wrote:
> >> > On Sun, Jan 15, 2012 at 03:58:43PM +0530, Rabin Vincent wrote:
> >> > > diff --git a/mm/backing-dev.c b/mm/backing-dev.c
> >> > > index 71034f4..a39ad70 100644
> >> > > --- a/mm/backing-dev.c
> >> > > +++ b/mm/backing-dev.c
> >> > > @@ -318,7 +318,7 @@ static void wakeup_timer_fn(unsigned long data)
> >> > >   if (bdi->wb.task) {
> >> > >           trace_writeback_wake_thread(bdi);
> >> > >           wake_up_process(bdi->wb.task);
> >> > > - } else {
> >> > > + } else if (bdi->dev) {
> >> > >           /*
> >> > >            * When bdi tasks are inactive for long time, they are killed.
> >> > >            * In this case we have to wake-up the forker thread which
> >> > > @@ -584,6 +584,8 @@ EXPORT_SYMBOL(bdi_register_dev);
> >> > >   */
> >> > >  static void bdi_wb_shutdown(struct backing_dev_info *bdi)
> >> > >  {
> >> > > + struct task_struct *task = NULL;
> 
> Thanks, I fully understand.
> In addition, Would not bdi_wakeup_flusher also be fixed?

Yes, indeed!

Thanks,
Fengguang

> >From dc7d4e86911c0a7ea35043485b04e8a09aa74ffd Mon Sep 17 00:00:00 2001
> From: Chanho Min <chanho.min@lge.com>
> Date: Mon, 16 Jan 2012 14:14:48 +0900
> Subject: [PATCH] backing-dev: add for 'fix wakeup timer races with
> bdi_unregister()'
> 
> Signed-off-by: Chanho Min <chanho.min@lge.com>
> ---
>  fs/fs-writeback.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
> index f855916..ee40833 100644
> --- a/fs/fs-writeback.c
> +++ b/fs/fs-writeback.c
> @@ -97,7 +97,7 @@ static void bdi_wakeup_flusher(struct backing_dev_info *bdi)
>  {
>         if (bdi->wb.task) {
>                 wake_up_process(bdi->wb.task);
> -       } else {
> +       } else if (bdi->dev) {
>                 /*
>                  * The bdi thread isn't there, wake up the forker thread which
>                  * will create and run it.
> -- 
> 1.7.0.4

  reply	other threads:[~2012-01-16  5:50 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-05  8:49 [PATCH] mm/backing-dev.c: fix crash when USB/SCSI device is detached Chanho Min
2012-01-15 10:28 ` Rabin Vincent
2012-01-15 12:58   ` Wu Fengguang
2012-01-15 15:41     ` Rabin Vincent
2012-01-16  2:53       ` Wu Fengguang
2012-01-16  5:28         ` Chanho Min
2012-01-16  5:50           ` Wu Fengguang [this message]
2012-01-16  5:53             ` Wu Fengguang
2012-01-16  6:34               ` Chanho Min
2012-01-18 19:43                 ` Rabin Vincent
2012-01-19 16:50         ` [PATCHv2] backing-dev: fix wakeup timer races with bdi_unregister() Rabin Vincent
2012-01-19 23:46           ` Namjae Jeon
2012-01-20  5:24             ` Rabin Vincent
2012-01-20  6:15               ` Namjae Jeon
2012-01-20 10:03                 ` Rabin Vincent
2012-01-20 11:18                   ` Namjae Jeon
2012-01-20 12:08                     ` Rabin Vincent
2012-01-20 15:04                       ` Namjae Jeon
2012-01-31 13:24           ` Wu Fengguang
  -- strict thread matches above, loose matches on Subject: below --
2012-01-03  3:47 [PATCH] mm/backing-dev.c: fix crash when USB/SCSI device is detached 'Chanho Min'
2012-01-03  3:47 'Chanho Min'
2012-01-02  9:38 민찬호
2012-01-02  9:38 민찬호
2012-01-02  9:57 ` Wu Fengguang
2012-01-02  9:57   ` Wu Fengguang
2012-01-03  3:23   ` Chanho Min
2012-01-03  3:23   ` Chanho Min
2012-01-03  4:49     ` Wu Fengguang
2012-01-03  4:49       ` Wu Fengguang
2012-01-03 11:22       ` Chanho Min
2012-01-03 11:22       ` Chanho Min

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20120116055044.GA14857@localhost \
    --to=fengguang.wu@intel.com \
    --cc=axboe@kernel.dk \
    --cc=chanho0207@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rabin@rab.in \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.