From: Jens Axboe Date: Thu, 29 Oct 2009 10:46:12 +0000 (+0100) Subject: backing-dev: ensure that a removed bdi no longer has super_block referencing it X-Git-Tag: v2.6.32-rc6~36^2 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=592b09a42fc3ae6737a0f3ecf4fee42ecd0296f8;p=pandora-kernel.git backing-dev: ensure that a removed bdi no longer has super_block referencing it When the bdi is being removed, we have to ensure that no super_blocks currently have that cached in sb->s_bdi. Normally this is ensured by the sb having a longer life span than the bdi, but if the device is suddenly yanked, we have to kill this reference. sb->s_bdi is pointed to freed memory at that point. This fixes a problem with sync(1) hanging when a USB stick is pulled without cleanly umounting it first. Reported-by: Pavel Machek Signed-off-by: Jens Axboe --- Reading git-diff-tree failed