Loading fs/gfs2/bmap.c +0 −24 Original line number Diff line number Diff line Loading @@ -961,30 +961,6 @@ static int __gfs2_iomap_get(struct inode *inode, loff_t pos, loff_t length, 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); Loading fs/gfs2/bmap.h +0 −1 Original line number Diff line number Diff line Loading @@ -66,6 +66,5 @@ extern int gfs2_write_alloc_required(struct gfs2_inode *ip, u64 offset, extern int gfs2_map_journal_extents(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd); extern void gfs2_free_journal_extents(struct gfs2_jdesc *jd); extern int __gfs2_punch_hole(struct file *file, loff_t offset, loff_t length); extern int gfs2_lblk_to_dblk(struct inode *inode, u32 lblock, u64 *dblock); #endif /* __BMAP_DOT_H__ */ fs/gfs2/log.c +5 −1 Original line number Diff line number Diff line Loading @@ -859,7 +859,11 @@ void gfs2_write_log_header(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd, if (!list_empty(&jd->extent_list)) dblock = gfs2_log_bmap(jd, lblock); else { int ret = gfs2_lblk_to_dblk(jd->jd_inode, lblock, &dblock); unsigned int extlen; int ret; extlen = 1; ret = gfs2_get_extent(jd->jd_inode, lblock, &dblock, &extlen); if (gfs2_assert_withdraw(sdp, ret == 0)) return; } Loading Loading
fs/gfs2/bmap.c +0 −24 Original line number Diff line number Diff line Loading @@ -961,30 +961,6 @@ static int __gfs2_iomap_get(struct inode *inode, loff_t pos, loff_t length, 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); Loading
fs/gfs2/bmap.h +0 −1 Original line number Diff line number Diff line Loading @@ -66,6 +66,5 @@ extern int gfs2_write_alloc_required(struct gfs2_inode *ip, u64 offset, extern int gfs2_map_journal_extents(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd); extern void gfs2_free_journal_extents(struct gfs2_jdesc *jd); extern int __gfs2_punch_hole(struct file *file, loff_t offset, loff_t length); extern int gfs2_lblk_to_dblk(struct inode *inode, u32 lblock, u64 *dblock); #endif /* __BMAP_DOT_H__ */
fs/gfs2/log.c +5 −1 Original line number Diff line number Diff line Loading @@ -859,7 +859,11 @@ void gfs2_write_log_header(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd, if (!list_empty(&jd->extent_list)) dblock = gfs2_log_bmap(jd, lblock); else { int ret = gfs2_lblk_to_dblk(jd->jd_inode, lblock, &dblock); unsigned int extlen; int ret; extlen = 1; ret = gfs2_get_extent(jd->jd_inode, lblock, &dblock, &extlen); if (gfs2_assert_withdraw(sdp, ret == 0)) return; } Loading