sysvipc: properly name ipc_addid() limit parameter
This is better understood as a limit, instead of size; exactly like the function comment indicates. Rename it. Link: http://lkml.kernel.org/r/20170831172049.14576-4-dave@stgolabs.net Signed-off-by: Davidlohr Bueso <dbueso@suse.de> Cc: Manfred Spraul <manfred@colorfullife.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
39c96a1b96
commit
ebf66799ac
10
ipc/util.c
10
ipc/util.c
@ -262,7 +262,7 @@ static inline int ipc_buildid(int id, struct ipc_ids *ids,
|
|||||||
* ipc_addid - add an ipc identifier
|
* ipc_addid - add an ipc identifier
|
||||||
* @ids: ipc identifier set
|
* @ids: ipc identifier set
|
||||||
* @new: new ipc permission set
|
* @new: new ipc permission set
|
||||||
* @size: limit for the number of used ids
|
* @limit: limit for the number of used ids
|
||||||
*
|
*
|
||||||
* Add an entry 'new' to the ipc ids idr. The permissions object is
|
* Add an entry 'new' to the ipc ids idr. The permissions object is
|
||||||
* initialised and the first free entry is set up and the id assigned
|
* initialised and the first free entry is set up and the id assigned
|
||||||
@ -271,16 +271,16 @@ static inline int ipc_buildid(int id, struct ipc_ids *ids,
|
|||||||
*
|
*
|
||||||
* Called with writer ipc_ids.rwsem held.
|
* Called with writer ipc_ids.rwsem held.
|
||||||
*/
|
*/
|
||||||
int ipc_addid(struct ipc_ids *ids, struct kern_ipc_perm *new, int size)
|
int ipc_addid(struct ipc_ids *ids, struct kern_ipc_perm *new, int limit)
|
||||||
{
|
{
|
||||||
kuid_t euid;
|
kuid_t euid;
|
||||||
kgid_t egid;
|
kgid_t egid;
|
||||||
int id, err;
|
int id, err;
|
||||||
|
|
||||||
if (size > IPCMNI)
|
if (limit > IPCMNI)
|
||||||
size = IPCMNI;
|
limit = IPCMNI;
|
||||||
|
|
||||||
if (!ids->tables_initialized || ids->in_use >= size)
|
if (!ids->tables_initialized || ids->in_use >= limit)
|
||||||
return -ENOSPC;
|
return -ENOSPC;
|
||||||
|
|
||||||
idr_preload(GFP_KERNEL);
|
idr_preload(GFP_KERNEL);
|
||||||
|
Loading…
Reference in New Issue
Block a user