mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
ipc/util.c: update return value of ipc_getref from int to bool
ipc_getref has still a return value of type "int", matching the atomic_t interface of atomic_inc_not_zero()/atomic_add_unless(). ipc_getref now uses refcount_inc_not_zero, which has a return value of type "bool". Therefore, update the return code to avoid implicit conversions. Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Manfred Spraul <[email protected]> Cc: Davidlohr Bueso <[email protected]> Cc: Davidlohr Bueso <[email protected]> Cc: Dmitry Vyukov <[email protected]> Cc: Herbert Xu <[email protected]> Cc: Kees Cook <[email protected]> Cc: Michael Kerrisk <[email protected]> Cc: Michal Hocko <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
27c331a174
commit
2a9d648100
2 changed files with 2 additions and 2 deletions
|
|
@ -462,7 +462,7 @@ void ipc_set_key_private(struct ipc_ids *ids, struct kern_ipc_perm *ipcp)
|
|||
ipcp->key = IPC_PRIVATE;
|
||||
}
|
||||
|
||||
int ipc_rcu_getref(struct kern_ipc_perm *ptr)
|
||||
bool ipc_rcu_getref(struct kern_ipc_perm *ptr)
|
||||
{
|
||||
return refcount_inc_not_zero(&ptr->refcount);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue