-Index: linux-2.6.16.i686/fs/inode.c
+Index: linux-2.6.15.i686/fs/inode.c
===================================================================
---- linux-2.6.16.i686.orig/fs/inode.c 2006-03-20 13:53:29.000000000 +0800
-+++ linux-2.6.16.i686/fs/inode.c 2006-05-30 23:42:33.000000000 +0800
+--- linux-2.6.15.i686.orig/fs/inode.c 2006-05-31 04:08:19.000000000 +0800
++++ linux-2.6.15.i686/fs/inode.c 2006-05-31 11:12:07.000000000 +0800
@@ -236,6 +236,7 @@
inodes_stat.nr_unused--;
}
/**
* clear_inode - clear an inode
* @inode: inode to clear
-Index: linux-2.6.16.i686/fs/open.c
+Index: linux-2.6.15.i686/fs/open.c
===================================================================
---- linux-2.6.16.i686.orig/fs/open.c 2006-05-30 15:47:16.000000000 +0800
-+++ linux-2.6.16.i686/fs/open.c 2006-05-30 23:42:33.000000000 +0800
+--- linux-2.6.15.i686.orig/fs/open.c 2006-05-31 04:08:39.000000000 +0800
++++ linux-2.6.15.i686/fs/open.c 2006-05-31 11:12:07.000000000 +0800
@@ -224,12 +224,12 @@
struct nameidata nd;
struct inode * inode;
if (error)
goto out;
inode = nd.dentry->d_inode;
-@@ -494,6 +494,7 @@
+@@ -488,6 +488,7 @@
int old_fsuid, old_fsgid;
kernel_cap_t old_cap;
int res;
if (mode & ~S_IRWXO) /* where's F_OK, X_OK, W_OK, R_OK? */
return -EINVAL;
-@@ -518,7 +519,7 @@
+@@ -512,7 +513,7 @@
else
current->cap_effective = current->cap_permitted;
if (!res) {
res = vfs_permission(&nd, mode);
/* SuS v2 requires we report a read only fs too */
-@@ -544,8 +545,9 @@
+@@ -538,8 +539,9 @@
{
struct nameidata nd;
int error;
if (error)
goto out;
-@@ -597,8 +599,9 @@
+@@ -591,8 +593,9 @@
{
struct nameidata nd;
int error;
if (error)
goto out;
-@@ -821,6 +824,7 @@
+@@ -815,6 +818,7 @@
error = open(inode, f);
if (error)
goto cleanup_all;
}
f->f_flags &= ~(O_CREAT | O_EXCL | O_NOCTTY | O_TRUNC);
-@@ -847,6 +851,7 @@
+@@ -841,6 +845,7 @@
f->f_dentry = NULL;
f->f_vfsmnt = NULL;
cleanup_file:
put_filp(f);
dput(dentry);
mntput(mnt);
-@@ -872,6 +877,7 @@
+@@ -866,6 +871,7 @@
{
int namei_flags, error;
struct nameidata nd;
namei_flags = flags;
if ((namei_flags+1) & O_ACCMODE)
-@@ -908,19 +914,19 @@
+@@ -902,19 +908,19 @@
struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry *dentry,
int (*open)(struct inode *, struct file *))
{
goto out;
}
EXPORT_SYMBOL_GPL(lookup_instantiate_filp);
-@@ -937,7 +943,8 @@
+@@ -931,7 +937,8 @@
struct file *filp;
/* Pick up the filp from the open intent */
/* Has the filesystem initialised the file for us? */
if (filp->f_dentry == NULL)
filp = __dentry_open(nd->dentry, nd->mnt, flags, filp, NULL);
-Index: linux-2.6.16.i686/fs/nfsctl.c
+Index: linux-2.6.15.i686/fs/nfsctl.c
===================================================================
---- linux-2.6.16.i686.orig/fs/nfsctl.c 2006-03-20 13:53:29.000000000 +0800
-+++ linux-2.6.16.i686/fs/nfsctl.c 2006-05-30 23:42:33.000000000 +0800
+--- linux-2.6.15.i686.orig/fs/nfsctl.c 2006-05-31 04:08:20.000000000 +0800
++++ linux-2.6.15.i686/fs/nfsctl.c 2006-05-31 11:12:07.000000000 +0800
@@ -26,6 +26,7 @@
struct nameidata nd;
int error;
nd.mnt = do_kern_mount("nfsd", 0, "nfsd", NULL);
if (IS_ERR(nd.mnt))
-Index: linux-2.6.16.i686/fs/namei.c
+Index: linux-2.6.15.i686/fs/namei.c
===================================================================
---- linux-2.6.16.i686.orig/fs/namei.c 2006-05-30 15:47:11.000000000 +0800
-+++ linux-2.6.16.i686/fs/namei.c 2006-05-30 23:42:33.000000000 +0800
+--- linux-2.6.15.i686.orig/fs/namei.c 2006-05-31 04:08:33.000000000 +0800
++++ linux-2.6.15.i686/fs/namei.c 2006-05-31 11:12:07.000000000 +0800
@@ -337,8 +337,19 @@
return 0;
}
if (IS_ERR(link))
goto fail;
-@@ -519,6 +539,9 @@
+@@ -519,6 +539,10 @@
/* weird __emul_prefix() stuff did it */
goto out;
}
+ intent_init(&nd->intent, it.it_op);
+ nd->intent.it_flags = it.it_flags;
+ nd->intent.it_create_mode = it.it_create_mode;
++ nd->intent.file = it.file;
res = link_path_walk(link, nd);
out:
if (nd->depth || res || nd->last_type!=LAST_NORM)
-@@ -772,6 +795,33 @@
+@@ -772,6 +796,33 @@
return PTR_ERR(dentry);
}
/*
* Name resolution.
* This is the basic name resolution function, turning a pathname into
-@@ -870,7 +920,11 @@
+@@ -870,7 +921,11 @@
goto out_dput;
if (inode->i_op->follow_link) {
if (err)
goto return_err;
err = -ENOENT;
-@@ -905,6 +959,23 @@
+@@ -905,6 +960,23 @@
inode = nd->dentry->d_inode;
/* fallthrough */
case 1:
goto return_reval;
}
if (nd->dentry->d_op && nd->dentry->d_op->d_hash) {
-@@ -912,7 +983,9 @@
+@@ -912,7 +984,9 @@
if (err < 0)
break;
}
if (err)
break;
inode = next.dentry->d_inode;
-@@ -1154,13 +1227,13 @@
+@@ -1154,13 +1228,13 @@
if (filp == NULL)
return -ENFILE;
path_release(nd);
}
} else if (err != 0)
-@@ -1263,7 +1336,7 @@
+@@ -1263,7 +1337,7 @@
}
/* SMP-safe */
{
unsigned long hash;
struct qstr this;
-@@ -1283,11 +1356,17 @@
+@@ -1283,11 +1357,17 @@
}
this.hash = end_name_hash(hash);
/*
* namei()
*
-@@ -1299,8 +1378,9 @@
+@@ -1299,8 +1379,9 @@
* that namei follows links, while lnamei does not.
* SMP-safe
*/
{
char *tmp = getname(name);
int err = PTR_ERR(tmp);
-@@ -1312,9 +1392,22 @@
+@@ -1312,9 +1393,22 @@
return err;
}
}
/*
-@@ -1596,6 +1689,8 @@
+@@ -1596,6 +1690,8 @@
if (flag & O_APPEND)
acc_mode |= MAY_APPEND;
/*
* The simplest case - just a plain lookup.
*/
-@@ -1610,6 +1705,7 @@
+@@ -1610,6 +1706,7 @@
/*
* Create - we need to know the parent.
*/
error = path_lookup_create(dfd,pathname,LOOKUP_PARENT,nd,flag,mode);
if (error)
return error;
-@@ -1626,7 +1722,9 @@
+@@ -1626,7 +1723,9 @@
dir = nd->dentry;
nd->flags &= ~LOOKUP_PARENT;
mutex_lock(&dir->d_inode->i_mutex);
path.mnt = nd->mnt;
do_last:
-@@ -1685,7 +1783,7 @@
+@@ -1685,7 +1784,7 @@
exit_dput:
dput_path(&path, nd);
exit:
release_open_intent(nd);
path_release(nd);
return error;
-@@ -1728,7 +1826,9 @@
+@@ -1728,7 +1827,9 @@
}
dir = nd->dentry;
mutex_lock(&dir->d_inode->i_mutex);
path.mnt = nd->mnt;
__putname(nd->last.name);
goto do_last;
-@@ -2240,6 +2340,8 @@
+@@ -2240,6 +2341,8 @@
int error;
char * to;
if (flags != 0)
return -EINVAL;
-Index: linux-2.6.16.i686/fs/stat.c
+@@ -2247,7 +2350,7 @@
+ if (IS_ERR(to))
+ return PTR_ERR(to);
+
+- error = __user_walk_fd(olddfd, oldname, 0, &old_nd);
++ error = __user_walk_fd_it(olddfd, oldname, 0, &old_nd);
+ if (error)
+ goto exit;
+ error = do_path_lookup(newdfd, to, LOOKUP_PARENT, &nd);
+Index: linux-2.6.15.i686/fs/stat.c
===================================================================
---- linux-2.6.16.i686.orig/fs/stat.c 2006-03-20 13:53:29.000000000 +0800
-+++ linux-2.6.16.i686/fs/stat.c 2006-05-30 23:42:33.000000000 +0800
+--- linux-2.6.15.i686.orig/fs/stat.c 2006-05-31 04:08:20.000000000 +0800
++++ linux-2.6.15.i686/fs/stat.c 2006-05-31 11:12:07.000000000 +0800
@@ -38,7 +38,7 @@
EXPORT_SYMBOL(generic_fillattr);
fput(f);
}
return error;
-Index: linux-2.6.16.i686/fs/namespace.c
+Index: linux-2.6.15.i686/fs/namespace.c
===================================================================
---- linux-2.6.16.i686.orig/fs/namespace.c 2006-05-30 15:47:11.000000000 +0800
-+++ linux-2.6.16.i686/fs/namespace.c 2006-05-30 23:42:33.000000000 +0800
+--- linux-2.6.15.i686.orig/fs/namespace.c 2006-05-31 04:08:33.000000000 +0800
++++ linux-2.6.15.i686/fs/namespace.c 2006-05-31 11:12:07.000000000 +0800
@@ -74,6 +74,7 @@
INIT_LIST_HEAD(&mnt->mnt_share);
INIT_LIST_HEAD(&mnt->mnt_slave_list);
/* Discard magic */
if ((flags & MS_MGC_MSK) == MS_MGC_VAL)
flags &= ~MS_MGC_MSK;
-Index: linux-2.6.16.i686/fs/exec.c
+Index: linux-2.6.15.i686/fs/exec.c
===================================================================
---- linux-2.6.16.i686.orig/fs/exec.c 2006-05-30 15:47:11.000000000 +0800
-+++ linux-2.6.16.i686/fs/exec.c 2006-05-30 23:42:33.000000000 +0800
+--- linux-2.6.15.i686.orig/fs/exec.c 2006-05-31 04:08:33.000000000 +0800
++++ linux-2.6.15.i686/fs/exec.c 2006-05-31 11:12:07.000000000 +0800
@@ -127,7 +127,9 @@
struct nameidata nd;
int error;
file = ERR_PTR(err);
if (!err) {
-Index: linux-2.6.16.i686/include/linux/dcache.h
+Index: linux-2.6.15.i686/include/linux/dcache.h
===================================================================
---- linux-2.6.16.i686.orig/include/linux/dcache.h 2006-05-30 15:47:11.000000000 +0800
-+++ linux-2.6.16.i686/include/linux/dcache.h 2006-05-31 00:52:42.000000000 +0800
+--- linux-2.6.15.i686.orig/include/linux/dcache.h 2006-05-31 04:08:33.000000000 +0800
++++ linux-2.6.15.i686/include/linux/dcache.h 2006-05-31 11:12:07.000000000 +0800
@@ -4,6 +4,7 @@
#ifdef __KERNEL__
const unsigned char *name;
};
-+#include <linux/namei.h>
++//#include <linux/namei.h>
+
struct dentry_stat_t {
int nr_dentry;
int nr_unused;
-Index: linux-2.6.16.i686/include/linux/fs.h
+Index: linux-2.6.15.i686/include/linux/fs.h
===================================================================
---- linux-2.6.16.i686.orig/include/linux/fs.h 2006-05-30 15:47:11.000000000 +0800
-+++ linux-2.6.16.i686/include/linux/fs.h 2006-05-30 23:42:33.000000000 +0800
+--- linux-2.6.15.i686.orig/include/linux/fs.h 2006-05-31 04:08:33.000000000 +0800
++++ linux-2.6.15.i686/include/linux/fs.h 2006-05-31 11:12:07.000000000 +0800
@@ -59,6 +59,7 @@
#define FMODE_READ 1
extern int filp_close(struct file *, fl_owner_t id);
extern char * getname(const char __user *);
-Index: linux-2.6.16.i686/include/linux/namei.h
+Index: linux-2.6.15.i686/include/linux/namei.h
===================================================================
---- linux-2.6.16.i686.orig/include/linux/namei.h 2006-05-30 15:47:16.000000000 +0800
-+++ linux-2.6.16.i686/include/linux/namei.h 2006-05-30 23:42:33.000000000 +0800
+--- linux-2.6.15.i686.orig/include/linux/namei.h 2006-05-31 04:08:39.000000000 +0800
++++ linux-2.6.15.i686/include/linux/namei.h 2006-05-31 11:13:47.000000000 +0800
@@ -5,10 +5,39 @@
struct vfsmount;
extern int FASTCALL(path_lookup(const char *, unsigned, struct nameidata *));
extern int FASTCALL(path_walk(const char *, struct nameidata *));
extern int FASTCALL(link_path_walk(const char *, struct nameidata *));
-Index: linux-2.6.16.i686/include/linux/mount.h
+Index: linux-2.6.15.i686/include/linux/mount.h
===================================================================
---- linux-2.6.16.i686.orig/include/linux/mount.h 2006-03-20 13:53:29.000000000 +0800
-+++ linux-2.6.16.i686/include/linux/mount.h 2006-05-30 23:42:33.000000000 +0800
+--- linux-2.6.15.i686.orig/include/linux/mount.h 2006-05-31 04:08:22.000000000 +0800
++++ linux-2.6.15.i686/include/linux/mount.h 2006-05-31 11:12:07.000000000 +0800
@@ -46,6 +46,8 @@
struct list_head mnt_slave; /* slave list entry */
struct vfsmount *mnt_master; /* slave is on master->mnt_slave_list */