git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
patch-2_6_7-vs1_9_1_12
[linux-2.6.git]
/
fs
/
readdir.c
diff --git
a/fs/readdir.c
b/fs/readdir.c
index
f02cae6
..
fbea474
100644
(file)
--- a/
fs/readdir.c
+++ b/
fs/readdir.c
@@
-14,6
+14,7
@@
#include <linux/fs.h>
#include <linux/dirent.h>
#include <linux/security.h>
#include <linux/fs.h>
#include <linux/dirent.h>
#include <linux/security.h>
+#include <linux/unistd.h>
#include <asm/uaccess.h>
#include <asm/uaccess.h>
@@
-49,10
+50,10
@@
EXPORT_SYMBOL(vfs_readdir);
* anyway. Thus the special "fillonedir()" function for that
* case (the low-level handlers don't need to care about this).
*/
* anyway. Thus the special "fillonedir()" function for that
* case (the low-level handlers don't need to care about this).
*/
-#define NAME_OFFSET(de) ((int) ((de)->d_name - (char *) (de)))
+#define NAME_OFFSET(de) ((int) ((de)->d_name - (char
__user
*) (de)))
#define ROUND_UP(x) (((x)+sizeof(long)-1) & ~(sizeof(long)-1))
#define ROUND_UP(x) (((x)+sizeof(long)-1) & ~(sizeof(long)-1))
-#if
ndef __ia64__
+#if
def __ARCH_WANT_OLD_READDIR
struct old_linux_dirent {
unsigned long d_ino;
struct old_linux_dirent {
unsigned long d_ino;
@@
-76,7
+77,7
@@
static int fillonedir(void * __buf, const char * name, int namlen, loff_t offset
return -EINVAL;
buf->result++;
dirent = buf->dirent;
return -EINVAL;
buf->result++;
dirent = buf->dirent;
- if (!access_ok(VERIFY_WRITE,
(unsigned long)
dirent,
+ if (!access_ok(VERIFY_WRITE, dirent,
(unsigned long)(dirent->d_name + namlen + 1) -
(unsigned long)dirent))
goto efault;
(unsigned long)(dirent->d_name + namlen + 1) -
(unsigned long)dirent))
goto efault;
@@
-115,7
+116,7
@@
out:
return error;
}
return error;
}
-#endif /*
!__ia64__
*/
+#endif /*
__ARCH_WANT_OLD_READDIR
*/
/*
* New, all-improved, singing, dancing, iBCS2-compliant getdents()
/*
* New, all-improved, singing, dancing, iBCS2-compliant getdents()
@@
-159,7
+160,7
@@
static int filldir(void * __buf, const char * name, int namlen, loff_t offset,
goto efault;
if (__put_user(0, dirent->d_name + namlen))
goto efault;
goto efault;
if (__put_user(0, dirent->d_name + namlen))
goto efault;
- if (__put_user(d_type, (char *) dirent + reclen - 1))
+ if (__put_user(d_type, (char
__user
*) dirent + reclen - 1))
goto efault;
buf->previous = dirent;
dirent = (void __user *)dirent + reclen;
goto efault;
buf->previous = dirent;
dirent = (void __user *)dirent + reclen;