diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index b8dd2fdd90d9f1f04e0b31aece5a1fd65d9b544e..7536ab837c3fad5a2d8de99d7bbf1fa5fa444a1a 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -1890,6 +1890,7 @@ static void ext4_ext_try_to_merge_up(handle_t *handle,
 	path[0].p_hdr->eh_max = cpu_to_le16(max_root);
 
 	brelse(path[1].p_bh);
+	path[1].p_bh = NULL;
 	ext4_free_blocks(handle, inode, NULL, blk, 1,
 			 EXT4_FREE_BLOCKS_METADATA | EXT4_FREE_BLOCKS_FORGET);
 }