Skip to content
Commit 3b9f4913 authored by Tom Rix's avatar Tom Rix Committed by Greg Kroah-Hartman
Browse files

btrfs: fix use of uninitialized variable at rm device ioctl

commit 37b45995 upstream.

Clang static analysis reports this problem
ioctl.c:3333:8: warning: 3rd function call argument is an
  uninitialized value
    ret = exclop_start_or_cancel_reloc(fs_info,

cancel is only set in one branch of an if-check and is always used.  So
initialize to false.

Fixes: 1a15eb72

 ("btrfs: use btrfs_get_dev_args_from_path in dev removal ioctls")
Reviewed-by: default avatarFilipe Manana <fdmanana@suse.com>
Reviewed-by: default avatarAnand Jain <anand.jain@oracle.com>
Signed-off-by: default avatarTom Rix <trix@redhat.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent cb91c054
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment