Correct bug introduced while purging the -ERRNO Linuxism from the

grant table API.  Valid grant refs are in the range of positive 32bit
integers.  ENOSPACE, being 29, is also a positive integer.  Return
GNTTAB_LIST_END (-1) instead when gnttab_claim_grant_reference() fails.
This commit is contained in:
Justin T. Gibbs 2009-12-29 23:28:13 +00:00
parent 10bc3a7f42
commit 88dd7ba72b
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=201234

View File

@ -325,7 +325,7 @@ gnttab_claim_grant_reference(grant_ref_t *private_head)
grant_ref_t g = *private_head;
if (unlikely(g == GNTTAB_LIST_END))
return (ENOSPC);
return (g);
*private_head = gnttab_entry(g);
return (g);
}