Re: [PATCH net-next 2/2] netns: fix error code when the nsid is already used

2017-06-10 Thread David Miller
From: Nicolas Dichtel Date: Fri, 9 Jun 2017 14:41:57 +0200 > When the user tries to assign a specific nsid, idr_alloc() is called with > the range [nsid, nsid+1]. If this nsid is already used, idr_alloc() returns > ENOSPC (No space left on device). In our case, it's better to return > EEXIST to

[PATCH net-next 2/2] netns: fix error code when the nsid is already used

2017-06-09 Thread Nicolas Dichtel
When the user tries to assign a specific nsid, idr_alloc() is called with the range [nsid, nsid+1]. If this nsid is already used, idr_alloc() returns ENOSPC (No space left on device). In our case, it's better to return EEXIST to make it clear that the nsid is not available. CC: Jamal Hadi Salim S