fs: use path_walk in do_path_lookup
[powerpc.git] / fs / select.c
index fe0893a..d862241 100644 (file)
  *     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/smp_lock.h>
 #include <linux/poll.h>
 #include <linux/personality.h> /* for STICKY_TIMEOUTS */
 #include <linux/file.h>
@@ -26,7 +26,6 @@
 
 #include <asm/uaccess.h>
 
-#define ROUND_UP(x,y) (((x)+(y)-1)/(y))
 #define DEFAULT_POLLMASK (POLLIN | POLLOUT | POLLRDNORM | POLLWRNORM)
 
 struct poll_table_page {
@@ -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 {
-                       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;
                }
        }
@@ -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 {
-                       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;
                }
        }
@@ -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 {
-                       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;
                }
        }