Skip to contentSkip to conversation

ext4: unused variables cleanup in check_eofblocks_fl and ext4_ext_map_blocks

PATCH In review Sergey Senozhatsky 2 participants 2 messages Mar 22, 2011 – Mar 23, 2011 ext4 file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ext4: unused variables cleanup in check_eofblocks_fl and ext4_ext_map_blocks

ext4 extents cleanup:

. remove unused `*ex' from check_eofblocks_fl
. remove unused `*eh' from ext4_ext_map_blocks

---

 fs/ext4/extents.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
fs/ext4/extents.c +1 -4
index 7516fb9..d89a448 100644
@@ -3108,14 +3108,13 @@ static int check_eofblocks_fl(handle_t *handle, struct inode *inode,
 {
 	int i, depth;
 	struct ext4_extent_header *eh;
-	struct ext4_extent *ex, *last_ex;
+	struct ext4_extent *last_ex;
 
 	if (!ext4_test_inode_flag(inode, EXT4_INODE_EOFBLOCKS))
 		return 0;
 
 	depth = ext_depth(inode);
 	eh = path[depth].p_hdr;
-	ex = path[depth].p_ext;
 
 	if (unlikely(!eh->eh_entries)) {
 		EXT4_ERROR_INODE(inode, "eh->eh_entries == 0 and "
@@ -3295,7 +3294,6 @@ int ext4_ext_map_blocks(handle_t *handle, struct inode *inode,
 			struct ext4_map_blocks *map, int flags)
 {
 	struct ext4_ext_path *path = NULL;
-	struct ext4_extent_header *eh;
 	struct ext4_extent newex, *ex;
 	ext4_fsblk_t newblock;
 	int err = 0, depth, ret;
@@ -3352,7 +3350,6 @@ int ext4_ext_map_blocks(handle_t *handle, struct inode *inode,
 		err = -EIO;
 		goto out2;
 	}
-	eh = path[depth].p_hdr;
 
 	ex = path[depth].p_ext;
 	if (ex) {
maintainer
#1 lore raw
Quoted 7 lines · Sergey Senozhatsky

ext4 extents cleanup:

. remove unused `*ex' from check_eofblocks_fl
. remove unused `*eh' from ext4_ext_map_blocks

Added to the ext4 patch queue, thanks.

- Ted