Re: [PATCH 1/1] [virt] virtio-blk: Use ida to allocate disk index

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jun 01, 2011 at 04:25:48AM -0400, Mark Wu wrote:
> On 06/01/2011 03:24 AM, Mark Wu wrote:
> >-	if (index_to_minor(index)>= 1<<  MINORBITS)
> >-		return -ENOSPC;
> >+	do {
> >+		if (!ida_pre_get(&vd_index_ida, GFP_KERNEL))
> >+			return err;
> >+
> There's a problem in above code: err is not initialized before
> using, so change it to return -1;
> +       do {
> +               if (!ida_pre_get(&vd_index_ida, GFP_KERNEL))
> +                       return -1;

Not -1. Pls return -ENOMEM.

_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linux-foundation.org/mailman/listinfo/virtualization


[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux