]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/md/dm-table.c
Merge branch 'for-linus' of git://git.kernel.dk/linux-2.6-block
[linux-2.6-omap-h63xx.git] / drivers / md / dm-table.c
index 2bcde5798b5a6c27dc9b07b6ea9325a88dfdf5f8..8939e61050884cd81cda3cdcbf7126b5b55e3dad 100644 (file)
@@ -213,12 +213,11 @@ static int alloc_targets(struct dm_table *t, unsigned int num)
 int dm_table_create(struct dm_table **result, int mode,
                    unsigned num_targets, struct mapped_device *md)
 {
-       struct dm_table *t = kmalloc(sizeof(*t), GFP_KERNEL);
+       struct dm_table *t = kzalloc(sizeof(*t), GFP_KERNEL);
 
        if (!t)
                return -ENOMEM;
 
-       memset(t, 0, sizeof(*t));
        INIT_LIST_HEAD(&t->devices);
        atomic_set(&t->holders, 1);
 
@@ -999,33 +998,6 @@ void dm_table_unplug_all(struct dm_table *t)
        }
 }
 
-int dm_table_flush_all(struct dm_table *t)
-{
-       struct list_head *d, *devices = dm_table_get_devices(t);
-       int ret = 0;
-       unsigned i;
-
-       for (i = 0; i < t->num_targets; i++)
-               if (t->targets[i].type->flush)
-                       t->targets[i].type->flush(&t->targets[i]);
-
-       for (d = devices->next; d != devices; d = d->next) {
-               struct dm_dev *dd = list_entry(d, struct dm_dev, list);
-               struct request_queue *q = bdev_get_queue(dd->bdev);
-               int err;
-
-               if (!q->issue_flush_fn)
-                       err = -EOPNOTSUPP;
-               else
-                       err = q->issue_flush_fn(q, dd->bdev->bd_disk, NULL);
-
-               if (!ret)
-                       ret = err;
-       }
-
-       return ret;
-}
-
 struct mapped_device *dm_table_get_md(struct dm_table *t)
 {
        dm_get(t->md);
@@ -1043,4 +1015,3 @@ EXPORT_SYMBOL(dm_table_get_md);
 EXPORT_SYMBOL(dm_table_put);
 EXPORT_SYMBOL(dm_table_get);
 EXPORT_SYMBOL(dm_table_unplug_all);
-EXPORT_SYMBOL(dm_table_flush_all);