* [PATCH] aio: remove unnecessary check
@ 2010-12-16 9:09 Namhyung Kim
2010-12-16 23:48 ` Jeff Moyer
0 siblings, 1 reply; 2+ messages in thread
From: Namhyung Kim @ 2010-12-16 9:09 UTC (permalink / raw)
To: Benjamin LaHaise, Alexander Viro; +Cc: linux-aio, linux-fsdevel, linux-kernel
'nr >= min_nr >= 0' always satisfies 'nr >= 0' so the check is unnecesary.
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
---
fs/aio.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/aio.c b/fs/aio.c
index c56153f5f73e..45766460fa57 100644
--- a/fs/aio.c
+++ b/fs/aio.c
@@ -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);
}
--
1.7.3.3.400.g93cef
--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to majordomo@kvack.org. For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] aio: remove unnecessary check
2010-12-16 9:09 [PATCH] aio: remove unnecessary check Namhyung Kim
@ 2010-12-16 23:48 ` Jeff Moyer
0 siblings, 0 replies; 2+ messages in thread
From: Jeff Moyer @ 2010-12-16 23:48 UTC (permalink / raw)
To: Namhyung Kim
Cc: Benjamin LaHaise, Alexander Viro, linux-aio, linux-fsdevel,
linux-kernel
Namhyung Kim <namhyung@gmail.com> writes:
> 'nr >= min_nr >= 0' always satisfies 'nr >= 0' so the check is unnecesary.
Yeah, I don't see how the extra check helps.
Acked-by: Jeff Moyer <jmoyer@redhat.com>
--
To unsubscribe, send a message with 'unsubscribe linux-aio' in
the body to majordomo@kvack.org. For more info on Linux AIO,
see: http://www.kvack.org/aio/
Don't email: <a href=mailto:"aart@kvack.org">aart@kvack.org</a>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-12-16 23:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-16 9:09 [PATCH] aio: remove unnecessary check Namhyung Kim
2010-12-16 23:48 ` Jeff Moyer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).