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 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;

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux