Lines Matching defs:new
187 * Insert new IPC object into idr tree, and set sequence number and id
195 * The caller must own kern_ipc_perm.lock.of the new object.
202 static inline int ipc_idr_alloc(struct ipc_ids *ids, struct kern_ipc_perm *new)
212 * As soon as a new object is inserted into the idr,
220 * (i.e.: set new->deleted, reduce refcount, call_rcu())
246 new->seq = ids->seq;
251 idr_replace(&ids->ipcs_idr, new, idx);
254 new->seq = ipcid_to_seqx(next_id);
255 idx = idr_alloc(&ids->ipcs_idr, new, ipcid_to_idx(next_id),
259 new->id = (new->seq << ipcmni_seq_shift()) + idx;
266 * @new: new ipc permission set
269 * Add an entry 'new' to the ipc ids idr. The permissions object is
271 * is returned. The 'new' entry is returned in a locked state on success.
278 int ipc_addid(struct ipc_ids *ids, struct kern_ipc_perm *new, int limit)
285 refcount_set(&new->refcount, 1);
295 spin_lock_init(&new->lock);
297 spin_lock(&new->lock);
300 new->cuid = new->uid = euid;
301 new->gid = new->cgid = egid;
303 new->deleted = false;
305 idx = ipc_idr_alloc(ids, new);
308 if (idx >= 0 && new->key != IPC_PRIVATE) {
309 err = rhashtable_insert_fast(&ids->key_ht, &new->khtnode,
317 new->deleted = true;
318 spin_unlock(&new->lock);
330 * ipcget_new - create a new ipc object
384 * ipcget_public - get an ipc object or create a new one
392 * It adds a new entry if the key is not found and does some permission
406 * a new entry + read locks are not "upgradable"
576 * old/new ipc_perm structures
582 * @out: new style ipc permissions
599 * ipc64_perm_to_ipc_perm - convert new ipc permissions to old
600 * @in: new style ipc permissions
603 * Turn the new style permissions object @in into a compatibility
756 * Return IPC_64 for new style IPC and IPC_OLD for old style IPC.