projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[BLOCK] Get rid of request_queue_t typedef
[powerpc.git]
/
fs
/
select.c
diff --git
a/fs/select.c
b/fs/select.c
index
dcbc111
..
a974082
100644
(file)
--- a/
fs/select.c
+++ b/
fs/select.c
@@
-14,10
+14,10
@@
* of fds to overcome nfds < 16390 descriptors limit (Tigran Aivazian).
*/
* of fds to overcome nfds < 16390 descriptors limit (Tigran Aivazian).
*/
+#include <linux/kernel.h>
#include <linux/syscalls.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/syscalls.h>
#include <linux/module.h>
#include <linux/slab.h>
-#include <linux/smp_lock.h>
#include <linux/poll.h>
#include <linux/personality.h> /* for STICKY_TIMEOUTS */
#include <linux/file.h>
#include <linux/poll.h>
#include <linux/personality.h> /* for STICKY_TIMEOUTS */
#include <linux/file.h>
@@
-26,7
+26,6
@@
#include <asm/uaccess.h>
#include <asm/uaccess.h>
-#define ROUND_UP(x,y) (((x)+(y)-1)/(y))
#define DEFAULT_POLLMASK (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM)
struct poll_table_page {
#define DEFAULT_POLLMASK (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM)
struct poll_table_page {
@@
-65,7
+64,7
@@
EXPORT_SYMBOL(poll_initwait);
static void free_poll_entry(struct poll_table_entry *entry)
{
static void free_poll_entry(struct poll_table_entry *entry)
{
- remove_wait_queue(entry->wait_address,&entry->wait);
+ remove_wait_queue(entry->wait_address,
&entry->wait);
fput(entry->filp);
}
fput(entry->filp);
}
@@
-129,7
+128,7
@@
static void __pollwait(struct file *filp, wait_queue_head_t *wait_address,
entry->filp = filp;
entry->wait_address = wait_address;
init_waitqueue_entry(&entry->wait, current);
entry->filp = filp;
entry->wait_address = wait_address;
init_waitqueue_entry(&entry->wait, current);
- add_wait_queue(wait_address,&entry->wait);
+ add_wait_queue(wait_address,
&entry->wait);
}
#define FDS_IN(fds, n) (fds->in + n)
}
#define FDS_IN(fds, n) (fds->in + n)
@@
-311,7
+310,7
@@
static int core_sys_select(int n, fd_set __user *inp, fd_set __user *outp,
{
fd_set_bits fds;
void *bits;
{
fd_set_bits fds;
void *bits;
- int ret, max_fds
et
;
+ int ret, max_fds;
unsigned int size;
struct fdtable *fdt;
/* Allocate small arguments on the stack to save memory and be faster */
unsigned int size;
struct fdtable *fdt;
/* Allocate small arguments on the stack to save memory and be faster */
@@
-321,13
+320,13
@@
static int core_sys_select(int n, fd_set __user *inp, fd_set __user *outp,
if (n < 0)
goto out_nofds;
if (n < 0)
goto out_nofds;
- /* max_fds
et
can increase, so grab it once to avoid race */
+ /* max_fds can increase, so grab it once to avoid race */
rcu_read_lock();
fdt = files_fdtable(current->files);
rcu_read_lock();
fdt = files_fdtable(current->files);
- max_fds
et = fdt->max_fdset
;
+ max_fds
= fdt->max_fds
;
rcu_read_unlock();
rcu_read_unlock();
- if (n > max_fds
et
)
- n = max_fds
et
;
+ if (n > max_fds)
+ n = max_fds;
/*
* We need 6 bitmaps (in/out/ex for both incoming and outgoing),
/*
* We need 6 bitmaps (in/out/ex for both incoming and outgoing),
@@
-399,7
+398,7
@@
asmlinkage long sys_select(int n, fd_set __user *inp, fd_set __user *outp,
if ((u64)tv.tv_sec >= (u64)MAX_INT64_SECONDS)
timeout = -1; /* infinite */
else {
if ((u64)tv.tv_sec >= (u64)MAX_INT64_SECONDS)
timeout = -1; /* infinite */
else {
- timeout = ROUND_UP(tv.tv_usec, USEC_PER_SEC/HZ);
+ timeout =
DIV_
ROUND_UP(tv.tv_usec, USEC_PER_SEC/HZ);
timeout += tv.tv_sec * HZ;
}
}
timeout += tv.tv_sec * HZ;
}
}
@@
-454,7
+453,7
@@
asmlinkage long sys_pselect7(int n, fd_set __user *inp, fd_set __user *outp,
if ((u64)ts.tv_sec >= (u64)MAX_INT64_SECONDS)
timeout = -1; /* infinite */
else {
if ((u64)ts.tv_sec >= (u64)MAX_INT64_SECONDS)
timeout = -1; /* infinite */
else {
- timeout = ROUND_UP(ts.tv_nsec, NSEC_PER_SEC/HZ);
+ timeout =
DIV_
ROUND_UP(ts.tv_nsec, NSEC_PER_SEC/HZ);
timeout += ts.tv_sec * HZ;
}
}
timeout += ts.tv_sec * HZ;
}
}
@@
-776,7
+775,7
@@
asmlinkage long sys_ppoll(struct pollfd __user *ufds, unsigned int nfds,
if ((u64)ts.tv_sec >= (u64)MAX_INT64_SECONDS)
timeout = -1; /* infinite */
else {
if ((u64)ts.tv_sec >= (u64)MAX_INT64_SECONDS)
timeout = -1; /* infinite */
else {
- timeout = ROUND_UP(ts.tv_nsec, NSEC_PER_SEC/HZ);
+ timeout =
DIV_
ROUND_UP(ts.tv_nsec, NSEC_PER_SEC/HZ);
timeout += ts.tv_sec * HZ;
}
}
timeout += ts.tv_sec * HZ;
}
}