mirror of
https://github.com/torvalds/linux.git
synced 2024-12-27 21:33:00 +00:00
BUG_ON() Conversion in ipc/util.c
this changes if() BUG(); constructs to BUG_ON() which is cleaner, contains unlikely() and can better optimized away. Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
This commit is contained in:
parent
99cee0cd75
commit
9bc98fc6fd
@ -266,8 +266,7 @@ struct kern_ipc_perm* ipc_rmid(struct ipc_ids* ids, int id)
|
|||||||
{
|
{
|
||||||
struct kern_ipc_perm* p;
|
struct kern_ipc_perm* p;
|
||||||
int lid = id % SEQ_MULTIPLIER;
|
int lid = id % SEQ_MULTIPLIER;
|
||||||
if(lid >= ids->entries->size)
|
BUG_ON(lid >= ids->entries->size);
|
||||||
BUG();
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* do not need a rcu_dereference()() here to force ordering
|
* do not need a rcu_dereference()() here to force ordering
|
||||||
@ -275,8 +274,7 @@ struct kern_ipc_perm* ipc_rmid(struct ipc_ids* ids, int id)
|
|||||||
*/
|
*/
|
||||||
p = ids->entries->p[lid];
|
p = ids->entries->p[lid];
|
||||||
ids->entries->p[lid] = NULL;
|
ids->entries->p[lid] = NULL;
|
||||||
if(p==NULL)
|
BUG_ON(p==NULL);
|
||||||
BUG();
|
|
||||||
ids->in_use--;
|
ids->in_use--;
|
||||||
|
|
||||||
if (lid == ids->max_id) {
|
if (lid == ids->max_id) {
|
||||||
|
Loading…
Reference in New Issue
Block a user