Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3a271111 authored by Rolf Eike Beer's avatar Rolf Eike Beer Committed by Linus Torvalds
Browse files

[PATCH] Remove BUG_ON(unlikely) in include/linux/aio.h



BUG_ON() does this unlikely check itself, as bugs in Linux are unlikely
anyway :)

Signed-off-by: default avatarRolf Eike Beer <eike-kernel@sf-tec.de>
Acked-by: default avatarZach Brown <zach.brown@oracle.com>
Acked-by: default avatarBenjamin LaHaise <benjamin.c.lahaise@intel.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 9ba0bdfd
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -213,11 +213,11 @@ int FASTCALL(io_submit_one(struct kioctx *ctx, struct iocb __user *user_iocb,
				  struct iocb *iocb));

#define get_ioctx(kioctx) do {						\
	BUG_ON(unlikely(atomic_read(&(kioctx)->users) <= 0));		\
	BUG_ON(atomic_read(&(kioctx)->users) <= 0);			\
	atomic_inc(&(kioctx)->users);					\
} while (0)
#define put_ioctx(kioctx) do {						\
	BUG_ON(unlikely(atomic_read(&(kioctx)->users) <= 0));		\
	BUG_ON(atomic_read(&(kioctx)->users) <= 0);			\
	if (unlikely(atomic_dec_and_test(&(kioctx)->users))) 		\
		__put_ioctx(kioctx);					\
} while (0)