diff options
author | Davidlohr Bueso <dave@stgolabs.net> | 2017-11-17 18:31:15 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2017-11-17 19:10:04 -0500 |
commit | ebf66799acfb5f52ada4ff96ecc9579867941ea9 (patch) | |
tree | 009527abb6375f6898ac1dd833ee9db31f863a08 /ipc | |
parent | 39c96a1b96a5991b1c9e79b85a8d74ef93b36026 (diff) |
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>
Diffstat (limited to 'ipc')
-rw-r--r-- | ipc/util.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ipc/util.c b/ipc/util.c index 429c06bdb8ef..e09bf76610ef 100644 --- a/ipc/util.c +++ b/ipc/util.c | |||
@@ -262,7 +262,7 @@ static inline int ipc_buildid(int id, struct ipc_ids *ids, | |||
262 | * ipc_addid - add an ipc identifier | 262 | * ipc_addid - add an ipc identifier |
263 | * @ids: ipc identifier set | 263 | * @ids: ipc identifier set |
264 | * @new: new ipc permission set | 264 | * @new: new ipc permission set |
265 | * @size: limit for the number of used ids | 265 | * @limit: limit for the number of used ids |
266 | * | 266 | * |
267 | * Add an entry 'new' to the ipc ids idr. The permissions object is | 267 | * Add an entry 'new' to the ipc ids idr. The permissions object is |
268 | * initialised and the first free entry is set up and the id assigned | 268 | * 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, | |||
271 | * | 271 | * |
272 | * Called with writer ipc_ids.rwsem held. | 272 | * Called with writer ipc_ids.rwsem held. |
273 | */ | 273 | */ |
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) |
275 | { | 275 | { |
276 | kuid_t euid; | 276 | kuid_t euid; |
277 | kgid_t egid; | 277 | kgid_t egid; |
278 | int id, err; | 278 | int id, err; |
279 | 279 | ||
280 | if (size > IPCMNI) | 280 | if (limit > IPCMNI) |
281 | size = IPCMNI; | 281 | limit = IPCMNI; |
282 | 282 | ||
283 | if (!ids->tables_initialized || ids->in_use >= size) | 283 | if (!ids->tables_initialized || ids->in_use >= limit) |
284 | return -ENOSPC; | 284 | return -ENOSPC; |
285 | 285 | ||
286 | idr_preload(GFP_KERNEL); | 286 | idr_preload(GFP_KERNEL); |