]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
removed a patch at the request of the developer
authorGreg Kroah-Hartman <gregkh@suse.de>
Thu, 19 May 2011 18:18:47 +0000 (11:18 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 19 May 2011 18:18:47 +0000 (11:18 -0700)
queue-2.6.38/block-rescan-partitions-on-invalidated-devices-on-enomedia-too.patch [deleted file]
queue-2.6.38/series

diff --git a/queue-2.6.38/block-rescan-partitions-on-invalidated-devices-on-enomedia-too.patch b/queue-2.6.38/block-rescan-partitions-on-invalidated-devices-on-enomedia-too.patch
deleted file mode 100644 (file)
index c1a6c5f..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-From 02e352287a40bd456eb78df705bf888bc3161d3f Mon Sep 17 00:00:00 2001
-From: Tejun Heo <tj@kernel.org>
-Date: Fri, 29 Apr 2011 10:15:20 +0200
-Subject: block: rescan partitions on invalidated devices on -ENOMEDIA too
-
-From: Tejun Heo <tj@kernel.org>
-
-commit 02e352287a40bd456eb78df705bf888bc3161d3f upstream.
-
-__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>
-Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
-Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-
----
- fs/block_dev.c |   27 ++++++++++++++++++---------
- 1 file changed, 18 insertions(+), 9 deletions(-)
-
---- a/fs/block_dev.c
-+++ b/fs/block_dev.c
-@@ -1099,6 +1099,7 @@ static int __blkdev_get(struct block_dev
-                       if (!bdev->bd_part)
-                               goto out_clear;
-+                      ret = 0;
-                       if (disk->fops->open) {
-                               ret = disk->fops->open(bdev, mode);
-                               if (ret == -ERESTARTSYS) {
-@@ -1114,9 +1115,18 @@ static int __blkdev_get(struct block_dev
-                                       mutex_unlock(&bdev->bd_mutex);
-                                       goto restart;
-                               }
--                              if (ret)
--                                      goto out_clear;
-                       }
-+                      /*
-+                       * If the device is invalidated, rescan partition
-+                       * if open succeeded or failed with -ENOMEDIUM.
-+                       * The latter is necessary to prevent ghost
-+                       * partitions on a removed medium.
-+                       */
-+                      if (bdev->bd_invalidated && (!ret || ret == -ENOMEDIUM))
-+                              rescan_partitions(disk, bdev);
-+                      if (ret)
-+                              goto out_clear;
-+
-                       if (!bdev->bd_openers) {
-                               bd_set_size(bdev,(loff_t)get_capacity(disk)<<9);
-                               bdi = blk_get_backing_dev_info(bdev);
-@@ -1124,8 +1134,6 @@ static int __blkdev_get(struct block_dev
-                                       bdi = &default_backing_dev_info;
-                               bdev_inode_switch_bdi(bdev->bd_inode, bdi);
-                       }
--                      if (bdev->bd_invalidated)
--                              rescan_partitions(disk, bdev);
-               } else {
-                       struct block_device *whole;
-                       whole = bdget_disk(disk, 0);
-@@ -1152,13 +1160,14 @@ static int __blkdev_get(struct block_dev
-               put_disk(disk);
-               disk = NULL;
-               if (bdev->bd_contains == bdev) {
--                      if (bdev->bd_disk->fops->open) {
-+                      ret = 0;
-+                      if (bdev->bd_disk->fops->open)
-                               ret = bdev->bd_disk->fops->open(bdev, mode);
--                              if (ret)
--                                      goto out_unlock_bdev;
--                      }
--                      if (bdev->bd_invalidated)
-+                      /* the same as first opener case, read comment there */
-+                      if (bdev->bd_invalidated && (!ret || ret == -ENOMEDIUM))
-                               rescan_partitions(bdev->bd_disk, bdev);
-+                      if (ret)
-+                              goto out_unlock_bdev;
-               }
-       }
-       bdev->bd_openers++;
index e283948adfeb1734fbaabf4610c2ba5af123ada8..52d5900e3ef8cfd59b179d12f2844c01ef745154 100644 (file)
@@ -54,7 +54,6 @@ cifs-add-fallback-in-is_path_accessible-for-old-servers.patch
 rapidio-fix-default-routing-initialization.patch
 revert-x86-amd-fix-apic-timer-erratum-400-affecting-k8-rev.a-e-processors.patch
 x86-amd-fix-arat-feature-setting-again.patch
-block-rescan-partitions-on-invalidated-devices-on-enomedia-too.patch
 clocksource-install-completely-before-selecting.patch
 tick-clear-broadcast-active-bit-when-switching-to-oneshot.patch
 x86-apic-fix-spurious-error-interrupts-triggering-on-all-non-boot-aps.patch