aboutsummaryrefslogtreecommitdiffstats
path: root/arch/parisc/hpux
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-14 21:36:21 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-06-14 21:36:21 -0400
commitaba297927d1d558c7a94548135133bdf9172708a (patch)
treed107c53de78175124ba5c3ade07fc295c48f9331 /arch/parisc/hpux
parent08f3dfe8c4b91189890019d307aad236c3633515 (diff)
parent462b529f91b618f4bd144bbc6184f616dfb58a1e (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/kyle/parisc-2.6: (30 commits) [PARISC] remove global_ack_eiem [PARISC] Fix kernel panic in check_ivt [PARISC] Fix bug when syscall nr is __NR_Linux_syscalls [PARISC] be more defensive in process.c::get_wchan [PARISC] fix "reduce size of task_struct on 64-bit machines" fallout [PARISC] fix null ptr deref in unwind.c [PARISC] fix trivial spelling nit in asm/linkage.h [PARISC] remove remnants of parisc-specific softirq code [PARISC] fix section mismatch in smp.c [PARISC] fix "ENTRY" macro redefinition [PARISC] Wire up utimensat/signalfd/timerfd/eventfd syscalls [PARISC] fix section mismatch in superio serial drivers [PARISC] fix section mismatch in parisc eisa driver [PARISC] fix section mismatches in arch/parisc/kernel [PARISC] fix section mismatch in ccio-dma [PARISC] fix section mismatch in parisc STI video drivers [PARISC] fix section mismatch in parport_gsc [PARISC] fix lasi_82596 build [PARISC] Build fixes for power.c [PARISC] kobject is embedded in subsys, not kset ...
Diffstat (limited to 'arch/parisc/hpux')
-rw-r--r--arch/parisc/hpux/fs.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/arch/parisc/hpux/fs.c b/arch/parisc/hpux/fs.c
index d86e15776779..f2042e6466a4 100644
--- a/arch/parisc/hpux/fs.c
+++ b/arch/parisc/hpux/fs.c
@@ -21,6 +21,7 @@
21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 21 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 */ 22 */
23 23
24#include <linux/kernel.h>
24#include <linux/mm.h> 25#include <linux/mm.h>
25#include <linux/sched.h> 26#include <linux/sched.h>
26#include <linux/file.h> 27#include <linux/file.h>
@@ -69,7 +70,6 @@ struct getdents_callback {
69}; 70};
70 71
71#define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de))) 72#define NAME_OFFSET(de) ((int) ((de)->d_name - (char __user *) (de)))
72#define ROUND_UP(x) (((x)+sizeof(long)-1) & ~(sizeof(long)-1))
73 73
74static int filldir(void * __buf, const char * name, int namlen, loff_t offset, 74static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
75 u64 ino, unsigned d_type) 75 u64 ino, unsigned d_type)
@@ -77,7 +77,7 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
77 struct hpux_dirent __user * dirent; 77 struct hpux_dirent __user * dirent;
78 struct getdents_callback * buf = (struct getdents_callback *) __buf; 78 struct getdents_callback * buf = (struct getdents_callback *) __buf;
79 ino_t d_ino; 79 ino_t d_ino;
80 int reclen = ROUND_UP(NAME_OFFSET(dirent) + namlen + 1); 80 int reclen = ALIGN(NAME_OFFSET(dirent) + namlen + 1, sizeof(long));
81 81
82 buf->error = -EINVAL; /* only used if we fail.. */ 82 buf->error = -EINVAL; /* only used if we fail.. */
83 if (reclen > buf->count) 83 if (reclen > buf->count)
@@ -102,7 +102,6 @@ static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
102} 102}
103 103
104#undef NAME_OFFSET 104#undef NAME_OFFSET
105#undef ROUND_UP
106 105
107int hpux_getdents(unsigned int fd, struct hpux_dirent __user *dirent, unsigned int count) 106int hpux_getdents(unsigned int fd, struct hpux_dirent __user *dirent, unsigned int count)
108{ 107{