]> pilppa.com Git - linux-2.6-omap-h63xx.git/commit
do_sys_poll: simplify playing with on-stack data
authorOleg Nesterov <oleg@tv-sign.ru>
Wed, 17 Oct 2007 06:26:17 +0000 (23:26 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 17 Oct 2007 15:42:48 +0000 (08:42 -0700)
commit252e5725cfb55a89e54888317856903fef9d5031
treeca93be8725e01885f8af68dac5f6ca20a2bafe11
parent759d7c6c47cf1439171d057a226453e96856c5de
do_sys_poll: simplify playing with on-stack data

Cleanup. Lessens both the source and compiled code (100 bytes) and imho makes
the code much more understandable.

With this patch "struct poll_list *head" always points to on-stack stack_pps,
so we can remove all "is it on-stack" and "was it initialized" checks.

Also, move poll_initwait/poll_freewait and -EINTR detection closer to the
do_poll()'s callsite.

[akpm@linux-foundation.org: fix warning (size_t != uint)]
Signed-off-by: Oleg Nesterov <oleg@tv-sign.ru>
Looks-good-to: Andi Kleen <ak@suse.de>
Cc: Davide Libenzi <davidel@xmailserver.org>
Cc: Vadim Lobanov <vlobanov@speakeasy.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/select.c