From e9061e214810c9534381a705a1b46533e09f2676 Mon Sep 17 00:00:00 2001
From: Chris Mason <chris.mason@oracle.com>
Date: Fri, 9 Oct 2009 09:57:45 -0400
Subject: [PATCH] Btrfs: fix uninit compiler warning in cow_file_range_nocow

The extent_type variable was exposed uninit via a goto.  It should be
impossible to trigger because it is protected by a check on another
variable, but this makes sure.

Signed-off-by: Chris Mason <chris.mason@oracle.com>
---
 fs/btrfs/inode.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index d960492d3d88..ef399a7794ff 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -1023,6 +1023,7 @@ static noinline int run_delalloc_nocow(struct inode *inode,
 
 		if (found_key.offset > cur_offset) {
 			extent_end = found_key.offset;
+			extent_type = 0;
 			goto out_check;
 		}
 
-- 
GitLab