mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
ipc: drop ipc_lock_by_ptr
After previous cleanups and optimizations, this function is no longer heavily used and we don't have a good reason to keep it. Update the few remaining callers and get rid of it. Signed-off-by: Davidlohr Bueso <[email protected]> Cc: Sedat Dilek <[email protected]> Cc: Rik van Riel <[email protected]> Cc: Manfred Spraul <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
530fcd16d8
commit
32a2750010
3 changed files with 6 additions and 9 deletions
|
|
@ -205,7 +205,8 @@ static struct kern_ipc_perm *ipc_findkey(struct ipc_ids *ids, key_t key)
|
|||
continue;
|
||||
}
|
||||
|
||||
ipc_lock_by_ptr(ipc);
|
||||
rcu_read_lock();
|
||||
ipc_lock_object(ipc);
|
||||
return ipc;
|
||||
}
|
||||
|
||||
|
|
@ -838,7 +839,8 @@ static struct kern_ipc_perm *sysvipc_find_ipc(struct ipc_ids *ids, loff_t pos,
|
|||
ipc = idr_find(&ids->ipcs_idr, pos);
|
||||
if (ipc != NULL) {
|
||||
*new_pos = pos + 1;
|
||||
ipc_lock_by_ptr(ipc);
|
||||
rcu_read_lock();
|
||||
ipc_lock_object(ipc);
|
||||
return ipc;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue