aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/bmap.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2021-03-27 22:05:14 +0100
committerAndreas Gruenbacher <agruenba@redhat.com>2021-04-03 21:38:12 +0200
commit152f58c9af21abf913699e671b425fd38447b170 (patch)
tree20a281ed72d7e5acedd85a9383590deb13b5787a /fs/gfs2/bmap.c
parentgfs2: Turn gfs2_extent_map into gfs2_{get,alloc}_extent (diff)
downloadlinux-dev-152f58c9af21abf913699e671b425fd38447b170.tar.xz
linux-dev-152f58c9af21abf913699e671b425fd38447b170.zip
gfs2: Replace gfs2_lblk_to_dblk with gfs2_get_extent
We don't need two very similar functions for mapping logical blocks to physical blocks. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/bmap.c')
-rw-r--r--fs/gfs2/bmap.c24
1 files changed, 0 insertions, 24 deletions
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c
index ac959a99ea81..bad5dc641bbd 100644
--- a/fs/gfs2/bmap.c
+++ b/fs/gfs2/bmap.c
@@ -961,30 +961,6 @@ hole_found:
goto out;
}
-/**
- * gfs2_lblk_to_dblk - convert logical block to disk block
- * @inode: the inode of the file we're mapping
- * @lblock: the block relative to the start of the file
- * @dblock: the returned dblock, if no error
- *
- * This function maps a single block from a file logical block (relative to
- * the start of the file) to a file system absolute block using iomap.
- *
- * Returns: the absolute file system block, or an error
- */
-int gfs2_lblk_to_dblk(struct inode *inode, u32 lblock, u64 *dblock)
-{
- struct iomap iomap = { };
- loff_t pos = (loff_t)lblock << inode->i_blkbits;
- int ret;
-
- ret = gfs2_iomap_get(inode, pos, i_blocksize(inode), &iomap);
- if (ret == 0)
- *dblock = iomap.addr >> inode->i_blkbits;
-
- return ret;
-}
-
static int gfs2_write_lock(struct inode *inode)
{
struct gfs2_inode *ip = GFS2_I(inode);