Skip to content

Commit ebf6679

Browse files
Davidlohr Buesotorvalds
authored andcommitted
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>
1 parent 39c96a1 commit ebf6679

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎ipc/util.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ static inline int ipc_buildid(int id, struct ipc_ids *ids,
262262
* ipc_addid - add an ipc identifier
263263
* @ids: ipc identifier set
264264
* @new: new ipc permission set
265-
* @size: limit for the number of used ids
265+
* @limit: limit for the number of used ids
266266
*
267267
* Add an entry 'new' to the ipc ids idr. The permissions object is
268268
* 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,
271271
*
272272
* Called with writer ipc_ids.rwsem held.
273273
*/
274-
int ipc_addid(struct ipc_ids *ids, struct kern_ipc_perm *new, int size)
274+
int ipc_addid(struct ipc_ids *ids, struct kern_ipc_perm *new, int limit)
275275
{
276276
kuid_t euid;
277277
kgid_t egid;
278278
int id, err;
279279

280-
if (size > IPCMNI)
281-
size = IPCMNI;
280+
if (limit > IPCMNI)
281+
limit = IPCMNI;
282282

283-
if (!ids->tables_initialized || ids->in_use >= size)
283+
if (!ids->tables_initialized || ids->in_use >= limit)
284284
return -ENOSPC;
285285

286286
idr_preload(GFP_KERNEL);

0 commit comments

Comments
 (0)