]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/md/dm-snap-persistent.c
ps3_gelic: Don't kill the device on DMA failure
[karo-tx-linux.git] / drivers / md / dm-snap-persistent.c
index 95891dfcbca021563a465751dacf064aee3a46df..135c2f1fdbfcc95aefb0d842030e71a089e87d30 100644 (file)
@@ -154,11 +154,6 @@ struct pstore {
        struct workqueue_struct *metadata_wq;
 };
 
-static unsigned sectors_to_pages(unsigned sectors)
-{
-       return DIV_ROUND_UP(sectors, PAGE_SIZE >> 9);
-}
-
 static int alloc_area(struct pstore *ps)
 {
        int r = -ENOMEM;
@@ -318,8 +313,7 @@ static int read_header(struct pstore *ps, int *new_snapshot)
                chunk_size_supplied = 0;
        }
 
-       ps->io_client = dm_io_client_create(sectors_to_pages(ps->store->
-                                                            chunk_size));
+       ps->io_client = dm_io_client_create();
        if (IS_ERR(ps->io_client))
                return PTR_ERR(ps->io_client);
 
@@ -368,11 +362,6 @@ static int read_header(struct pstore *ps, int *new_snapshot)
                return r;
        }
 
-       r = dm_io_client_resize(sectors_to_pages(ps->store->chunk_size),
-                               ps->io_client);
-       if (r)
-               return r;
-
        r = alloc_area(ps);
        return r;