aboutsummaryrefslogtreecommitdiffstats
path: root/fs/select.c
diff options
context:
space:
mode:
authorKarsten Wiese <fzu@wemgehoertderstaat.de>2008-02-06 04:37:59 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-06 13:41:09 -0500
commit844fcc53962d781aab7c164acbfa46505427375e (patch)
tree2d0108617ebff6eec82c7c21f5bdf3a7610d4525 /fs/select.c
parent54d2a37eda3211d3b14c162238e9ccee43e023a9 (diff)
make sys_poll() wait at least timeout ms
schedule_timeout(jiffies) waits for at least jiffies - 1. Add 1 jiffie to the timeout_jiffies calculated in sys_poll() to wait at least timeout_msecs, like poll() manpage says. Signed-off-by: Karsten Wiese <fzu@wemgehoertderstaat.de> Cc: Ingo Molnar <mingo@elte.hu> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/select.c')
-rw-r--r--fs/select.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/select.c b/fs/select.c
index 47f47925aea2..5633fe980781 100644
--- a/fs/select.c
+++ b/fs/select.c
@@ -739,7 +739,7 @@ asmlinkage long sys_poll(struct pollfd __user *ufds, unsigned int nfds,
739 timeout_jiffies = -1; 739 timeout_jiffies = -1;
740 else 740 else
741#endif 741#endif
742 timeout_jiffies = msecs_to_jiffies(timeout_msecs); 742 timeout_jiffies = msecs_to_jiffies(timeout_msecs) + 1;
743 } else { 743 } else {
744 /* Infinite (< 0) or no (0) timeout */ 744 /* Infinite (< 0) or no (0) timeout */
745 timeout_jiffies = timeout_msecs; 745 timeout_jiffies = timeout_msecs;