mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-03-16 12:14:06 +00:00
btrfs: fix use of uninitialized variable at rm device ioctl
commit37b4599547
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:1a15eb724a
("btrfs: use btrfs_get_dev_args_from_path in dev removal ioctls") Reviewed-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: Tom Rix <trix@redhat.com> Signed-off-by: David Sterba <dsterba@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
f236ddecb0
commit
0d8a334c1f
1 changed files with 1 additions and 1 deletions
|
@ -3291,7 +3291,7 @@ static long btrfs_ioctl_rm_dev(struct file *file, void __user *arg)
|
|||
struct block_device *bdev = NULL;
|
||||
fmode_t mode;
|
||||
int ret;
|
||||
bool cancel;
|
||||
bool cancel = false;
|
||||
|
||||
if (!capable(CAP_SYS_ADMIN))
|
||||
return -EPERM;
|
||||
|
|
Loading…
Add table
Reference in a new issue