9202477
From: Chris Mason <clm@fb.com>
9202477
Date: Sat, 11 Apr 2015 05:09:06 -0700
9202477
Subject: [PATCH] Btrfs: fix uninit variable in clone ioctl
9202477
9202477
Commit 0d97a64e0 creates a new variable but doesn't always set it up.
9202477
This puts it back to the original method (key.offset + 1) for the cases
9202477
not covered by Filipe's new logic.
9202477
9202477
Signed-off-by: Chris Mason <clm@fb.com>
9202477
---
9202477
 fs/btrfs/ioctl.c | 2 +-
9202477
 1 file changed, 1 insertion(+), 1 deletion(-)
9202477
9202477
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
9202477
index d79c599240a7..64e8fb639f72 100644
9202477
--- a/fs/btrfs/ioctl.c
9202477
+++ b/fs/btrfs/ioctl.c
9202477
@@ -3206,7 +3206,7 @@ static int btrfs_clone(struct inode *src, struct inode *inode,
9202477
 	key.offset = off;
9202477
 
9202477
 	while (1) {
9202477
-		u64 next_key_min_offset;
9202477
+		u64 next_key_min_offset = key.offset + 1;
9202477
 
9202477
 		/*
9202477
 		 * note the key will change type as we walk through the