Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 359369
b: refs/heads/master
c: a1c36b1
h: refs/heads/master
i:
  359367: 12fee83
v: v3
  • Loading branch information
Tejun Heo authored and Linus Torvalds committed Feb 28, 2013
1 parent 17bb69e commit 90bb91d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 17 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6d770931291eec7e7be774a5272db28d29899a66
refs/heads/master: a1c36b166be76763cfab1a4308a00d6ffd8a2cc0
17 changes: 1 addition & 16 deletions trunk/drivers/vfio/vfio.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,23 +139,8 @@ EXPORT_SYMBOL_GPL(vfio_unregister_iommu_driver);
*/
static int vfio_alloc_group_minor(struct vfio_group *group)
{
int ret, minor;

again:
if (unlikely(idr_pre_get(&vfio.group_idr, GFP_KERNEL) == 0))
return -ENOMEM;

/* index 0 is used by /dev/vfio/vfio */
ret = idr_get_new_above(&vfio.group_idr, group, 1, &minor);
if (ret == -EAGAIN)
goto again;
if (ret || minor > MINORMASK) {
if (minor > MINORMASK)
idr_remove(&vfio.group_idr, minor);
return -ENOSPC;
}

return minor;
return idr_alloc(&vfio.group_idr, group, 1, MINORMASK + 1, GFP_KERNEL);
}

static void vfio_free_group_minor(int minor)
Expand Down

0 comments on commit 90bb91d

Please sign in to comment.