fs/dcache.c | 20 ++
- fs/exec.c | 2
+ fs/exec.c | 16 +-
fs/namei.c | 356 +++++++++++++++++++++++++++++++++++++++++--------
fs/nfsd/vfs.c | 2
fs/open.c | 125 ++++++++++++++---
include/linux/dcache.h | 28 +++
include/linux/fs.h | 31 +++-
kernel/ksyms.c | 1
- 9 files changed, 492 insertions(+), 81 deletions(-)
+ 9 files changed, 500 insertions(+), 87 deletions(-)
---- rh-2.4.20/fs/dcache.c~vfs_intent-2.4.20-rh 2003-04-11 14:04:58.000000000 +0800
-+++ rh-2.4.20-root/fs/dcache.c 2003-04-13 10:28:10.000000000 +0800
+--- linux-rh-2.4.20-8/fs/dcache.c~vfs_intent-2.4.20-rh 2003-04-11 14:04:58.000000000 +0800
++++ linux-rh-2.4.20-8-root/fs/dcache.c 2003-04-23 18:27:35.000000000 +0800
@@ -186,6 +186,13 @@ int d_invalidate(struct dentry * dentry)
spin_unlock(&dcache_lock);
return 0;
}
#define do_switch(x,y) do { \
---- rh-2.4.20/fs/namei.c~vfs_intent-2.4.20-rh 2003-04-11 14:04:57.000000000 +0800
-+++ rh-2.4.20-root/fs/namei.c 2003-04-13 10:28:10.000000000 +0800
+--- linux-rh-2.4.20-8/fs/namei.c~vfs_intent-2.4.20-rh 2003-04-11 14:04:57.000000000 +0800
++++ linux-rh-2.4.20-8-root/fs/namei.c 2003-04-23 18:27:35.000000000 +0800
@@ -94,6 +94,13 @@
* XEmacs seems to be relying on it...
*/
if (page) {
kunmap(page);
page_cache_release(page);
---- rh-2.4.20/fs/nfsd/vfs.c~vfs_intent-2.4.20-rh 2003-04-11 14:04:48.000000000 +0800
-+++ rh-2.4.20-root/fs/nfsd/vfs.c 2003-04-13 10:28:10.000000000 +0800
+--- linux-rh-2.4.20-8/fs/nfsd/vfs.c~vfs_intent-2.4.20-rh 2003-04-11 14:04:48.000000000 +0800
++++ linux-rh-2.4.20-8-root/fs/nfsd/vfs.c 2003-04-23 18:27:35.000000000 +0800
@@ -1293,7 +1293,7 @@ nfsd_rename(struct svc_rqst *rqstp, stru
err = nfserr_perm;
} else
if (!err && EX_ISSYNC(tfhp->fh_export)) {
nfsd_sync_dir(tdentry);
nfsd_sync_dir(fdentry);
---- rh-2.4.20/fs/open.c~vfs_intent-2.4.20-rh 2003-04-11 14:04:57.000000000 +0800
-+++ rh-2.4.20-root/fs/open.c 2003-04-13 10:28:10.000000000 +0800
+--- linux-rh-2.4.20-8/fs/open.c~vfs_intent-2.4.20-rh 2003-04-11 14:04:57.000000000 +0800
++++ linux-rh-2.4.20-8-root/fs/open.c 2003-04-23 18:27:35.000000000 +0800
@@ -19,6 +19,8 @@
#include <asm/uaccess.h>
/*
* Find an empty file descriptor entry, and mark it busy.
*/
---- rh-2.4.20/fs/stat.c~vfs_intent-2.4.20-rh 2003-04-11 14:05:08.000000000 +0800
-+++ rh-2.4.20-root/fs/stat.c 2003-04-13 10:34:40.000000000 +0800
+--- linux-rh-2.4.20-8/fs/stat.c~vfs_intent-2.4.20-rh 2003-04-11 14:05:08.000000000 +0800
++++ linux-rh-2.4.20-8-root/fs/stat.c 2003-04-23 18:27:35.000000000 +0800
@@ -110,11 +110,13 @@ static int do_getattr(struct vfsmount *m
int vfs_stat(char *name, struct kstat *stat)
{
path_release(&nd);
}
return error;
---- rh-2.4.20/include/linux/dcache.h~vfs_intent-2.4.20-rh 2003-04-12 15:46:39.000000000 +0800
-+++ rh-2.4.20-root/include/linux/dcache.h 2003-04-13 10:28:10.000000000 +0800
+--- linux-rh-2.4.20-8/include/linux/dcache.h~vfs_intent-2.4.20-rh 2003-04-12 15:46:39.000000000 +0800
++++ linux-rh-2.4.20-8-root/include/linux/dcache.h 2003-04-23 18:27:35.000000000 +0800
@@ -7,6 +7,25 @@
#include <linux/mount.h>
#include <linux/kernel.h>
extern spinlock_t dcache_lock;
---- rh-2.4.20/include/linux/fs.h~vfs_intent-2.4.20-rh 2003-04-12 16:15:26.000000000 +0800
-+++ rh-2.4.20-root/include/linux/fs.h 2003-04-13 10:28:10.000000000 +0800
+--- linux-rh-2.4.20-8/include/linux/fs.h~vfs_intent-2.4.20-rh 2003-04-23 18:25:49.000000000 +0800
++++ linux-rh-2.4.20-8-root/include/linux/fs.h 2003-04-23 18:27:35.000000000 +0800
@@ -337,6 +337,8 @@ extern void set_bh_page(struct buffer_he
#define ATTR_MTIME_SET 256
#define ATTR_FORCE 512 /* Not a change, but a change it */
extern int page_readlink(struct dentry *, char *, int);
extern int page_follow_link(struct dentry *, struct nameidata *);
extern struct inode_operations page_symlink_inode_operations;
---- rh-2.4.20/kernel/ksyms.c~vfs_intent-2.4.20-rh 2003-04-12 16:15:26.000000000 +0800
-+++ rh-2.4.20-root/kernel/ksyms.c 2003-04-13 10:28:10.000000000 +0800
+--- linux-rh-2.4.20-8/kernel/ksyms.c~vfs_intent-2.4.20-rh 2003-04-23 18:25:50.000000000 +0800
++++ linux-rh-2.4.20-8-root/kernel/ksyms.c 2003-04-23 18:27:35.000000000 +0800
@@ -298,6 +298,7 @@ EXPORT_SYMBOL(read_cache_page);
EXPORT_SYMBOL(set_page_dirty);
EXPORT_SYMBOL(vfs_readlink);
EXPORT_SYMBOL(page_readlink);
EXPORT_SYMBOL(page_follow_link);
EXPORT_SYMBOL(page_symlink_inode_operations);
---- rh-2.4.20/fs/exec.c~vfs_intent-2.4.20-rh 2003-04-13 10:07:02.000000000 +0800
-+++ rh-2.4.20-root/fs/exec.c 2003-04-13 10:28:10.000000000 +0800
-@@ -1283,7 +1283,7 @@ int do_coredump(long signr, int exit_cod
+--- linux-rh-2.4.20-8/fs/exec.c~vfs_intent-2.4.20-rh 2003-04-13 10:07:02.000000000 +0800
++++ linux-rh-2.4.20-8-root/fs/exec.c 2003-04-23 18:34:24.000000000 +0800
+@@ -114,8 +114,9 @@ asmlinkage long sys_uselib(const char *
+ struct file * file;
+ struct nameidata nd;
+ int error;
+-
+- error = user_path_walk(library, &nd);
++ struct lookup_intent it = { .it_op = IT_OPEN, .it_flags = O_RDONLY };
++
++ error = user_path_walk_it(library, &nd, &it);
+ if (error)
+ goto out;
+
+@@ -127,7 +128,7 @@ asmlinkage long sys_uselib(const char *
+ if (error)
+ goto exit;
+
+- file = dentry_open(nd.dentry, nd.mnt, O_RDONLY);
++ file = dentry_open_it(nd.dentry, nd.mnt, O_RDONLY, &it);
+ error = PTR_ERR(file);
+ if (IS_ERR(file))
+ goto out;
+@@ -382,8 +383,9 @@ struct file *open_exec(const char *name)
+ struct inode *inode;
+ struct file *file;
+ int err = 0;
+-
+- err = path_lookup(name, LOOKUP_FOLLOW|LOOKUP_POSITIVE, &nd);
++ struct lookup_intent it = { .it_op = IT_OPEN, .it_flags = O_RDONLY };
++
++ err = path_lookup_it(name, LOOKUP_FOLLOW|LOOKUP_POSITIVE, &nd, &it);
+ file = ERR_PTR(err);
+ if (!err) {
+ inode = nd.dentry->d_inode;
+@@ -395,7 +397,7 @@ struct file *open_exec(const char *name)
+ err = -EACCES;
+ file = ERR_PTR(err);
+ if (!err) {
+- file = dentry_open(nd.dentry, nd.mnt, O_RDONLY);
++ file = dentry_open_it(nd.dentry, nd.mnt, O_RDONLY, &it);
+ if (!IS_ERR(file)) {
+ err = deny_write_access(file);
+ if (err) {
+@@ -1283,7 +1285,7 @@ int do_coredump(long signr, int exit_cod
goto close_fail;
if (!file->f_op->write)
goto close_fail;