diff options
author | Steve French <sfrench@us.ibm.com> | 2008-05-06 13:55:32 -0400 |
---|---|---|
committer | Steve French <sfrench@us.ibm.com> | 2008-05-06 13:55:32 -0400 |
commit | a815752ac0ffdb910e92958d41d28f4fb28e5296 (patch) | |
tree | a3aa16a282354da0debe8e3a3a7ed8aac6e54001 /fs/select.c | |
parent | 5ade9deaaa3e1f7291467d97b238648e43eae15e (diff) | |
parent | a15306365a16380f3bafee9e181ba01231d4acd7 (diff) |
Merge branch 'master' of /pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'fs/select.c')
-rw-r--r-- | fs/select.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/fs/select.c b/fs/select.c index 00f58c5c7e05..8dda969614a9 100644 --- a/fs/select.c +++ b/fs/select.c | |||
@@ -21,6 +21,7 @@ | |||
21 | #include <linux/poll.h> | 21 | #include <linux/poll.h> |
22 | #include <linux/personality.h> /* for STICKY_TIMEOUTS */ | 22 | #include <linux/personality.h> /* for STICKY_TIMEOUTS */ |
23 | #include <linux/file.h> | 23 | #include <linux/file.h> |
24 | #include <linux/fdtable.h> | ||
24 | #include <linux/fs.h> | 25 | #include <linux/fs.h> |
25 | #include <linux/rcupdate.h> | 26 | #include <linux/rcupdate.h> |
26 | 27 | ||
@@ -298,7 +299,7 @@ int do_select(int n, fd_set_bits *fds, s64 *timeout) | |||
298 | #define MAX_SELECT_SECONDS \ | 299 | #define MAX_SELECT_SECONDS \ |
299 | ((unsigned long) (MAX_SCHEDULE_TIMEOUT / HZ)-1) | 300 | ((unsigned long) (MAX_SCHEDULE_TIMEOUT / HZ)-1) |
300 | 301 | ||
301 | static int core_sys_select(int n, fd_set __user *inp, fd_set __user *outp, | 302 | int core_sys_select(int n, fd_set __user *inp, fd_set __user *outp, |
302 | fd_set __user *exp, s64 *timeout) | 303 | fd_set __user *exp, s64 *timeout) |
303 | { | 304 | { |
304 | fd_set_bits fds; | 305 | fd_set_bits fds; |
@@ -425,7 +426,7 @@ sticky: | |||
425 | return ret; | 426 | return ret; |
426 | } | 427 | } |
427 | 428 | ||
428 | #ifdef TIF_RESTORE_SIGMASK | 429 | #ifdef HAVE_SET_RESTORE_SIGMASK |
429 | asmlinkage long sys_pselect7(int n, fd_set __user *inp, fd_set __user *outp, | 430 | asmlinkage long sys_pselect7(int n, fd_set __user *inp, fd_set __user *outp, |
430 | fd_set __user *exp, struct timespec __user *tsp, | 431 | fd_set __user *exp, struct timespec __user *tsp, |
431 | const sigset_t __user *sigmask, size_t sigsetsize) | 432 | const sigset_t __user *sigmask, size_t sigsetsize) |
@@ -498,7 +499,7 @@ sticky: | |||
498 | if (sigmask) { | 499 | if (sigmask) { |
499 | memcpy(¤t->saved_sigmask, &sigsaved, | 500 | memcpy(¤t->saved_sigmask, &sigsaved, |
500 | sizeof(sigsaved)); | 501 | sizeof(sigsaved)); |
501 | set_thread_flag(TIF_RESTORE_SIGMASK); | 502 | set_restore_sigmask(); |
502 | } | 503 | } |
503 | } else if (sigmask) | 504 | } else if (sigmask) |
504 | sigprocmask(SIG_SETMASK, &sigsaved, NULL); | 505 | sigprocmask(SIG_SETMASK, &sigsaved, NULL); |
@@ -528,7 +529,7 @@ asmlinkage long sys_pselect6(int n, fd_set __user *inp, fd_set __user *outp, | |||
528 | 529 | ||
529 | return sys_pselect7(n, inp, outp, exp, tsp, up, sigsetsize); | 530 | return sys_pselect7(n, inp, outp, exp, tsp, up, sigsetsize); |
530 | } | 531 | } |
531 | #endif /* TIF_RESTORE_SIGMASK */ | 532 | #endif /* HAVE_SET_RESTORE_SIGMASK */ |
532 | 533 | ||
533 | struct poll_list { | 534 | struct poll_list { |
534 | struct poll_list *next; | 535 | struct poll_list *next; |
@@ -759,7 +760,7 @@ asmlinkage long sys_poll(struct pollfd __user *ufds, unsigned int nfds, | |||
759 | return ret; | 760 | return ret; |
760 | } | 761 | } |
761 | 762 | ||
762 | #ifdef TIF_RESTORE_SIGMASK | 763 | #ifdef HAVE_SET_RESTORE_SIGMASK |
763 | asmlinkage long sys_ppoll(struct pollfd __user *ufds, unsigned int nfds, | 764 | asmlinkage long sys_ppoll(struct pollfd __user *ufds, unsigned int nfds, |
764 | struct timespec __user *tsp, const sigset_t __user *sigmask, | 765 | struct timespec __user *tsp, const sigset_t __user *sigmask, |
765 | size_t sigsetsize) | 766 | size_t sigsetsize) |
@@ -805,7 +806,7 @@ asmlinkage long sys_ppoll(struct pollfd __user *ufds, unsigned int nfds, | |||
805 | if (sigmask) { | 806 | if (sigmask) { |
806 | memcpy(¤t->saved_sigmask, &sigsaved, | 807 | memcpy(¤t->saved_sigmask, &sigsaved, |
807 | sizeof(sigsaved)); | 808 | sizeof(sigsaved)); |
808 | set_thread_flag(TIF_RESTORE_SIGMASK); | 809 | set_restore_sigmask(); |
809 | } | 810 | } |
810 | ret = -ERESTARTNOHAND; | 811 | ret = -ERESTARTNOHAND; |
811 | } else if (sigmask) | 812 | } else if (sigmask) |
@@ -839,4 +840,4 @@ asmlinkage long sys_ppoll(struct pollfd __user *ufds, unsigned int nfds, | |||
839 | 840 | ||
840 | return ret; | 841 | return ret; |
841 | } | 842 | } |
842 | #endif /* TIF_RESTORE_SIGMASK */ | 843 | #endif /* HAVE_SET_RESTORE_SIGMASK */ |