mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Heinz Diehl <htd@fancy-poultry.org>
To: linux-kernel@vger.kernel.org
Cc: Jens Axboe <jens.axboe@oracle.com>, Jiri Kosina <jkosina@suse.cz>,
	Pavel Machek <pavel@ucw.cz>, "Rafael J. Wysocki" <rjw@sisk.pl>
Subject: Re: 2.6.32-rc5: surprise removal of USB mass storage, and whole system goes to hell
Date: Sun, 15 Nov 2009 10:46:32 +0100	[thread overview]
Message-ID: <20091115094632.GB11463@fancy-poultry.org> (raw)
In-Reply-To: <20091029083820.GZ10727@kernel.dk>

On 29.10.2009, Jens Axboe wrote: 

I had the same problem which has been discussed in this thread, 
and can confirm that this patch from Jens Axboe (which is already merged into 2.6.32-rc7) 
fixes it for me.

> diff --git a/mm/backing-dev.c b/mm/backing-dev.c
> index 4f53a6d..756c31b 100644
> --- a/mm/backing-dev.c
> +++ b/mm/backing-dev.c
> @@ -614,6 +616,18 @@ static void bdi_wb_shutdown(struct backing_dev_info *bdi)
>  		kthread_stop(wb->task);
>  }
>  
> +static void bdi_prune_sb(struct backing_dev_info *bdi)
> +{
> +	struct super_block *sb;
> +
> +	spin_lock(&sb_lock);
> +	list_for_each_entry(sb, &super_blocks, s_list) {
> +		if (sb->s_bdi == bdi)
> +			sb->s_bdi = NULL;
> +	}
> +	spin_unlock(&sb_lock);
> +}
> +
>  void bdi_unregister(struct backing_dev_info *bdi)
>  {
>  	if (bdi->dev) {
> @@ -624,6 +638,8 @@ void bdi_unregister(struct backing_dev_info *bdi)
>  		device_unregister(bdi->dev);
>  		bdi->dev = NULL;
>  	}
> +
> +	bdi_prune_sb(bdi);
>  }
>  EXPORT_SYMBOL(bdi_unregister);

  reply	other threads:[~2009-11-15  9:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-10-27 21:19 Pavel Machek
2009-10-28  1:14 ` Jiri Kosina
2009-10-28  9:55   ` Jens Axboe
2009-10-28 14:07     ` Jens Axboe
2009-10-29  8:38       ` Jens Axboe
2009-11-15  9:46         ` Heinz Diehl [this message]
2009-10-28  1:18 ` Yong Zhang

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=20091115094632.GB11463@fancy-poultry.org \
    --to=htd@fancy-poultry.org \
    --cc=jens.axboe@oracle.com \
    --cc=jkosina@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@ucw.cz \
    --cc=rjw@sisk.pl \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®