Merge branch 'for-2.6.37' of git://linux-nfs.org/~bfields/linux
[pandora-kernel.git] / block / genhd.c
index 8313834..5fa2b44 100644 (file)
@@ -22,9 +22,7 @@
 #include "blk.h"
 
 static DEFINE_MUTEX(block_class_lock);
-#ifndef CONFIG_SYSFS_DEPRECATED
 struct kobject *block_depr;
-#endif
 
 /* for extended dynamic devt allocation, currently only one major is used */
 #define MAX_EXT_DEVT           (1 << MINORBITS)
@@ -810,10 +808,9 @@ static int __init genhd_device_init(void)
 
        register_blkdev(BLOCK_EXT_MAJOR, "blkext");
 
-#ifndef CONFIG_SYSFS_DEPRECATED
        /* create top-level block dir */
-       block_depr = kobject_create_and_add("block", NULL);
-#endif
+       if (!sysfs_deprecated)
+               block_depr = kobject_create_and_add("block", NULL);
        return 0;
 }
 
@@ -932,15 +929,8 @@ static void disk_free_ptbl_rcu_cb(struct rcu_head *head)
 {
        struct disk_part_tbl *ptbl =
                container_of(head, struct disk_part_tbl, rcu_head);
-       struct gendisk *disk = ptbl->disk;
-       struct request_queue *q = disk->queue;
-       unsigned long flags;
 
        kfree(ptbl);
-
-       spin_lock_irqsave(q->queue_lock, flags);
-       elv_quiesce_end(q);
-       spin_unlock_irqrestore(q->queue_lock, flags);
 }
 
 /**
@@ -958,17 +948,11 @@ static void disk_replace_part_tbl(struct gendisk *disk,
                                  struct disk_part_tbl *new_ptbl)
 {
        struct disk_part_tbl *old_ptbl = disk->part_tbl;
-       struct request_queue *q = disk->queue;
 
        rcu_assign_pointer(disk->part_tbl, new_ptbl);
 
        if (old_ptbl) {
                rcu_assign_pointer(old_ptbl->last_lookup, NULL);
-
-               spin_lock_irq(q->queue_lock);
-               elv_quiesce_start(q);
-               spin_unlock_irq(q->queue_lock);
-
                call_rcu(&old_ptbl->rcu_head, disk_free_ptbl_rcu_cb);
        }
 }
@@ -1009,7 +993,6 @@ int disk_expand_part_tbl(struct gendisk *disk, int partno)
                return -ENOMEM;
 
        new_ptbl->len = target;
-       new_ptbl->disk = disk;
 
        for (i = 0; i < len; i++)
                rcu_assign_pointer(new_ptbl->part[i], old_ptbl->part[i]);