aboutsummaryrefslogtreecommitdiffstats
path: root/block/cfq-iosched.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2011-04-29 10:15:20 +0200
committerJens Axboe <jaxboe@fusionio.com>2011-04-29 10:17:26 +0200
commit02e352287a40bd456eb78df705bf888bc3161d3f (patch)
treeaa6462a305d17a52d8a717640bbd558f49f1834e /block/cfq-iosched.c
parentbf2253a6f00e8fea5b026e471e9f0d0a1b3621f2 (diff)
downloadkernel_samsung_smdk4412-02e352287a40bd456eb78df705bf888bc3161d3f.zip
kernel_samsung_smdk4412-02e352287a40bd456eb78df705bf888bc3161d3f.tar.gz
kernel_samsung_smdk4412-02e352287a40bd456eb78df705bf888bc3161d3f.tar.bz2
block: rescan partitions on invalidated devices on -ENOMEDIA too
__blkdev_get() doesn't rescan partitions if disk->fops->open() fails, which leads to ghost partition devices lingering after medimum removal is known to both the kernel and userland. The behavior also creates a subtle inconsistency where O_NONBLOCK open, which doesn't fail even if there's no medium, clears the ghots partitions, which is exploited to work around the problem from userland. Fix it by updating __blkdev_get() to issue partition rescan after -ENOMEDIA too. This was reported in the following bz. https://bugzilla.kernel.org/show_bug.cgi?id=13029 Stable: 2.6.38 Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: David Zeuthen <zeuthen@gmail.com> Reported-by: Martin Pitt <martin.pitt@ubuntu.com> Reported-by: Kay Sievers <kay.sievers@vrfy.org> Tested-by: Kay Sievers <kay.sievers@vrfy.org> Cc: Alan Cox <alan@lxorguk.ukuu.org.uk> Cc: stable@kernel.org Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
Diffstat (limited to 'block/cfq-iosched.c')
0 files changed, 0 insertions, 0 deletions