From: Chris Mason Date: Sat, 11 Apr 2015 12:09:06 +0000 (-0700) Subject: Btrfs: fix uninit variable in clone ioctl X-Git-Tag: v4.0.6~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1e24644ae5af0b11a9153c0b6d981c215d7c3585;p=thirdparty%2Fkernel%2Fstable.git Btrfs: fix uninit variable in clone ioctl commit de249e66a73d696666281cd812087979c6fae552 upstream. Commit 0d97a64e0 creates a new variable but doesn't always set it up. This puts it back to the original method (key.offset + 1) for the cases not covered by Filipe's new logic. Signed-off-by: Chris Mason Signed-off-by: Greg Kroah-Hartman --- diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index d79c599240a76..64e8fb639f72d 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -3206,7 +3206,7 @@ static int btrfs_clone(struct inode *src, struct inode *inode, key.offset = off; while (1) { - u64 next_key_min_offset; + u64 next_key_min_offset = key.offset + 1; /* * note the key will change type as we walk through the