Skip to content

Commit

Permalink
gfs2: Eliminate gfs2_trim_blocks
Browse files Browse the repository at this point in the history
Function gfs2_trim_blocks is not referenced. Eliminate it.

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
  • Loading branch information
AstralBob authored and Andreas Gruenbacher committed Apr 18, 2023
1 parent cfcdb5b commit 7d1b377
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 9 deletions.
8 changes: 0 additions & 8 deletions fs/gfs2/bmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -2035,14 +2035,6 @@ static int do_shrink(struct inode *inode, u64 newsize)
return error;
}

void gfs2_trim_blocks(struct inode *inode)
{
int ret;

ret = do_shrink(inode, inode->i_size);
WARN_ON(ret != 0);
}

/**
* do_grow - Touch and update inode size
* @inode: The inode
Expand Down
1 change: 0 additions & 1 deletion fs/gfs2/bmap.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ extern int gfs2_get_extent(struct inode *inode, u64 lblock, u64 *dblock,
extern int gfs2_alloc_extent(struct inode *inode, u64 lblock, u64 *dblock,
unsigned *extlen, bool *new);
extern int gfs2_setattr_size(struct inode *inode, u64 size);
extern void gfs2_trim_blocks(struct inode *inode);
extern int gfs2_truncatei_resume(struct gfs2_inode *ip);
extern int gfs2_file_dealloc(struct gfs2_inode *ip);
extern int gfs2_write_alloc_required(struct gfs2_inode *ip, u64 offset,
Expand Down

0 comments on commit 7d1b377

Please sign in to comment.