summaryrefslogtreecommitdiffstats
path: root/ipc/util.h
diff options
context:
space:
mode:
authorRafael Aquini <aquini@redhat.com>2014-01-28 02:07:02 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2014-01-28 06:02:39 +0100
commit72a8ff2f9245128c254387c58f948f1f0152ea46 (patch)
tree176eec6a1d264e9e679d7bd73eb3f5b77975e4a3 /ipc/util.h
parentipc: introduce ipc_valid_object() helper to sort out IPC_RMID races (diff)
downloadlinux-72a8ff2f9245128c254387c58f948f1f0152ea46.tar.xz
linux-72a8ff2f9245128c254387c58f948f1f0152ea46.zip
ipc: change kern_ipc_perm.deleted type to bool
struct kern_ipc_perm.deleted is meant to be used as a boolean toggle, and the changes introduced by this patch are just to make the case explicit. Signed-off-by: Rafael Aquini <aquini@redhat.com> Reviewed-by: Rik van Riel <riel@redhat.com> Cc: Greg Thelen <gthelen@google.com> Acked-by: Davidlohr Bueso <davidlohr@hp.com> 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/util.h')
-rw-r--r--ipc/util.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/ipc/util.h b/ipc/util.h
index d05b7085a887..a1cbc3aaf25a 100644
--- a/ipc/util.h
+++ b/ipc/util.h
@@ -195,7 +195,7 @@ static inline void ipc_unlock(struct kern_ipc_perm *perm)
*/
static inline bool ipc_valid_object(struct kern_ipc_perm *perm)
{
- return perm->deleted == 0;
+ return !perm->deleted;
}
struct kern_ipc_perm *ipc_obtain_object_check(struct ipc_ids *ids, int id);