[Devel] [PATCH 1/2] ploop: Remove unused argument get_block

Kirill Tkhai ktkhai at virtuozzo.com
Fri Feb 15 13:08:45 MSK 2019


Signed-off-by: Kirill Tkhai <ktkhai at virtuozzo.com>
---
 drivers/block/ploop/io_direct.c     |    3 +--
 drivers/block/ploop/io_direct_map.c |   16 ++++++----------
 drivers/block/ploop/io_direct_map.h |    2 +-
 3 files changed, 8 insertions(+), 13 deletions(-)

diff --git a/drivers/block/ploop/io_direct.c b/drivers/block/ploop/io_direct.c
index 5388169c19de..6a43a8e5cba8 100644
--- a/drivers/block/ploop/io_direct.c
+++ b/drivers/block/ploop/io_direct.c
@@ -702,8 +702,7 @@ static struct extent_map * dio_fallocate(struct ploop_io *io, u32 iblk, int nr)
 				  io->files.mapping,
 				  (sector_t)iblk << io->plo->cluster_log,
 				  1 << io->plo->cluster_log,
-				  1, mapping_gfp_mask(io->files.mapping),
-				  NULL);
+				  1, mapping_gfp_mask(io->files.mapping));
 	mutex_unlock(&io->files.inode->i_mutex);
 	return em;
 }
diff --git a/drivers/block/ploop/io_direct_map.c b/drivers/block/ploop/io_direct_map.c
index bfc9325b72c6..99fdf6f080e6 100644
--- a/drivers/block/ploop/io_direct_map.c
+++ b/drivers/block/ploop/io_direct_map.c
@@ -747,7 +747,7 @@ static struct extent_map *__map_extent_bmap(struct ploop_io *io,
 static struct extent_map *__map_extent(struct ploop_io *io,
 				       struct address_space *mapping,
 				       sector_t start, sector_t len, int create,
-				       gfp_t gfp_mask, get_block_t get_block)
+				       gfp_t gfp_mask)
 {
 	struct extent_map_tree *tree = io->files.em_tree;
 
@@ -764,14 +764,13 @@ static struct extent_map *__map_extent(struct ploop_io *io,
 struct extent_map *map_extent_get_block(struct ploop_io *io,
 					struct address_space *mapping,
 					sector_t start, sector_t len, int create,
-					gfp_t gfp_mask, get_block_t get_block)
+					gfp_t gfp_mask)
 {
 	struct extent_map *em;
 	sector_t last;
 	sector_t map_ahead_len = 0;
 
-	em = __map_extent(io, mapping, start, len, create,
-			  gfp_mask, get_block);
+	em = __map_extent(io, mapping, start, len, create, gfp_mask);
 
 	/*
 	 * if we're doing a write or we found a large extent, return it
@@ -792,8 +791,7 @@ struct extent_map *map_extent_get_block(struct ploop_io *io,
 
 		last = em->end;
 		ploop_extent_put(em);
-		em = __map_extent(io, mapping, last, len, create,
-				  gfp_mask, get_block);
+		em = __map_extent(io, mapping, last, len, create, gfp_mask);
 		if (IS_ERR(em) || !em)
 			break;
 		map_ahead_len += em->end - last;
@@ -805,8 +803,7 @@ struct extent_map *map_extent_get_block(struct ploop_io *io,
 	    start + len > em->end) {
 		if (em && !IS_ERR(em))
 			ploop_extent_put(em);
-		em = __map_extent(io, mapping, start, len, create,
-				  gfp_mask, get_block);
+		em = __map_extent(io, mapping, start, len, create, gfp_mask);
 	}
 	return em;
 }
@@ -818,8 +815,7 @@ struct extent_map *extent_lookup_create(struct ploop_io *io,
 	struct extent_map_tree *tree = io->files.em_tree;
 
 	return map_extent_get_block(io, tree->mapping,
-				    start, len, 0, mapping_gfp_mask(tree->mapping),
-				    NULL);
+				    start, len, 0, mapping_gfp_mask(tree->mapping));
 }
 
 static int drop_extent_map(struct extent_map_tree *tree)
diff --git a/drivers/block/ploop/io_direct_map.h b/drivers/block/ploop/io_direct_map.h
index 3db809aa6188..17ab6668be48 100644
--- a/drivers/block/ploop/io_direct_map.h
+++ b/drivers/block/ploop/io_direct_map.h
@@ -54,7 +54,7 @@ void ploop_extent_put(struct extent_map *em);
 struct extent_map *map_extent_get_block(struct ploop_io *io,
 					struct address_space *mapping,
 					sector_t start, sector_t len, int create,
-					gfp_t gfp_mask, get_block_t get_block);
+					gfp_t gfp_mask);
 void trim_extent_mappings(struct ploop_device *plo,
 			  struct extent_map_tree *tree, sector_t start);
 



More information about the Devel mailing list