Skip to contentSkip to conversation

aio: remove unnecessary check

PATCH In review Namhyung Kim 2 participants 2 messages Dec 16, 2010

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 aio: remove unnecessary check

'nr >= min_nr >= 0' always satisfies 'nr >= 0' so the check is unnecesary.

---
 fs/aio.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
fs/aio.c +1 -1
index c56153f5f73e..45766460fa57 100644
@@ -1839,7 +1839,7 @@ SYSCALL_DEFINE5(io_getevents, aio_context_t, ctx_id,
 	long ret = -EINVAL;
 
 	if (likely(ioctx)) {
-		if (likely(min_nr <= nr && min_nr >= 0 && nr >= 0))
+		if (likely(min_nr <= nr && min_nr >= 0))
 			ret = read_events(ioctx, min_nr, nr, events, timeout);
 		put_ioctx(ioctx);
 	}
Signature · 7 lines
1.7.3.3.400.g93cef

--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to [email protected].  For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"[email protected]">[email protected]</a>