Index: linux-2.6.9-5.0.3.EL/fs/exec.c
===================================================================
---- linux-2.6.9-5.0.3.EL.orig/fs/exec.c 2005-02-26 14:28:01.373228096 +0200
-+++ linux-2.6.9-5.0.3.EL/fs/exec.c 2005-02-26 14:32:04.728232512 +0200
+--- linux-2.6.9-5.0.3.EL.orig/fs/exec.c 2005-02-26 14:28:01.000000000 +0200
++++ linux-2.6.9-5.0.3.EL/fs/exec.c 2005-02-26 23:29:02.000000000 +0200
@@ -124,9 +124,10 @@
struct file * file;
struct nameidata nd;
if (err) {
Index: linux-2.6.9-5.0.3.EL/fs/namei.c
===================================================================
---- linux-2.6.9-5.0.3.EL.orig/fs/namei.c 2005-02-26 14:28:01.378227336 +0200
-+++ linux-2.6.9-5.0.3.EL/fs/namei.c 2005-02-26 14:32:04.732231904 +0200
+--- linux-2.6.9-5.0.3.EL.orig/fs/namei.c 2005-02-26 14:28:01.000000000 +0200
++++ linux-2.6.9-5.0.3.EL/fs/namei.c 2005-04-01 18:15:29.743029208 +0300
@@ -272,8 +272,19 @@
return 0;
}
/*
* Name resolution.
*
-@@ -752,7 +801,9 @@
+@@ -751,8 +800,12 @@
+ goto out_dput;
if (inode->i_op->follow_link) {
++ int save_flags = nd->flags;
mntget(next.mnt);
+ nd->flags |= LOOKUP_LINK_NOTLAST;
err = do_follow_link(next.dentry, nd);
-+ nd->flags &= ~LOOKUP_LINK_NOTLAST;
++ if (!(save_flags & LOOKUP_LINK_NOTLAST))
++ nd->flags &= ~LOOKUP_LINK_NOTLAST;
dput(next.dentry);
mntput(next.mnt);
if (err)
-@@ -791,14 +842,34 @@
+@@ -791,14 +844,34 @@
inode = nd->dentry->d_inode;
/* fallthrough */
case 1:
if (err)
break;
follow_mount(&next.mnt, &next.dentry);
-@@ -1016,7 +1087,7 @@
+@@ -1016,7 +1089,7 @@
}
/* SMP-safe */
{
unsigned long hash;
struct qstr this;
-@@ -1036,11 +1107,16 @@
+@@ -1036,11 +1109,16 @@
}
this.hash = end_name_hash(hash);
/*
* namei()
*
-@@ -1052,7 +1128,7 @@
+@@ -1052,7 +1130,7 @@
* that namei follows links, while lnamei does not.
* SMP-safe
*/
{
char *tmp = getname(name);
int err = PTR_ERR(tmp);
-@@ -1064,6 +1140,12 @@
+@@ -1064,6 +1142,12 @@
return err;
}
/*
* It's inline, so penalty for filesystems that don't use sticky bit is
* minimal.
-@@ -1347,8 +1429,8 @@
+@@ -1347,8 +1431,8 @@
acc_mode |= MAY_APPEND;
/* Fill in the open() intent data */
/*
* The simplest case - just a plain lookup.
-@@ -1363,6 +1445,7 @@
+@@ -1363,6 +1447,7 @@
/*
* Create - we need to know the parent.
*/
error = path_lookup(pathname, LOOKUP_PARENT|LOOKUP_OPEN|LOOKUP_CREATE, nd);
if (error)
return error;
-@@ -1379,7 +1462,9 @@
+@@ -1379,7 +1464,9 @@
dir = nd->dentry;
nd->flags &= ~LOOKUP_PARENT;
down(&dir->d_inode->i_sem);
do_last:
error = PTR_ERR(dentry);
-@@ -1492,7 +1577,9 @@
+@@ -1492,7 +1579,9 @@
}
dir = nd->dentry;
down(&dir->d_inode->i_sem);
}
Index: linux-2.6.9-5.0.3.EL/fs/namespace.c
===================================================================
---- linux-2.6.9-5.0.3.EL.orig/fs/namespace.c 2005-02-26 14:28:01.381226880 +0200
-+++ linux-2.6.9-5.0.3.EL/fs/namespace.c 2005-02-26 14:32:04.734231600 +0200
+--- linux-2.6.9-5.0.3.EL.orig/fs/namespace.c 2005-02-26 14:28:01.000000000 +0200
++++ linux-2.6.9-5.0.3.EL/fs/namespace.c 2005-02-26 23:29:02.000000000 +0200
@@ -61,6 +61,7 @@
INIT_LIST_HEAD(&mnt->mnt_mounts);
INIT_LIST_HEAD(&mnt->mnt_list);
flags &= ~MS_MGC_MSK;
Index: linux-2.6.9-5.0.3.EL/fs/open.c
===================================================================
---- linux-2.6.9-5.0.3.EL.orig/fs/open.c 2005-02-26 14:28:01.383226576 +0200
-+++ linux-2.6.9-5.0.3.EL/fs/open.c 2005-02-26 14:32:04.736231296 +0200
+--- linux-2.6.9-5.0.3.EL.orig/fs/open.c 2005-02-26 14:28:01.000000000 +0200
++++ linux-2.6.9-5.0.3.EL/fs/open.c 2005-02-26 23:29:02.000000000 +0200
@@ -215,12 +215,12 @@
struct nameidata nd;
struct inode * inode;
*/
Index: linux-2.6.9-5.0.3.EL/fs/stat.c
===================================================================
---- linux-2.6.9-5.0.3.EL.orig/fs/stat.c 2005-02-26 14:28:01.384226424 +0200
-+++ linux-2.6.9-5.0.3.EL/fs/stat.c 2005-02-26 14:32:04.738230992 +0200
+--- linux-2.6.9-5.0.3.EL.orig/fs/stat.c 2005-02-26 14:28:01.000000000 +0200
++++ linux-2.6.9-5.0.3.EL/fs/stat.c 2005-02-26 23:29:02.000000000 +0200
@@ -37,7 +37,7 @@
EXPORT_SYMBOL(generic_fillattr);
return error;
Index: linux-2.6.9-5.0.3.EL/fs/nfs/dir.c
===================================================================
---- linux-2.6.9-5.0.3.EL.orig/fs/nfs/dir.c 2005-02-26 14:28:01.387225968 +0200
-+++ linux-2.6.9-5.0.3.EL/fs/nfs/dir.c 2005-02-26 14:32:04.740230688 +0200
+--- linux-2.6.9-5.0.3.EL.orig/fs/nfs/dir.c 2005-02-26 14:28:01.000000000 +0200
++++ linux-2.6.9-5.0.3.EL/fs/nfs/dir.c 2005-04-01 18:10:28.924760536 +0300
@@ -718,7 +718,7 @@
return 0;
if (!nd || (nd->flags & LOOKUP_CONTINUE) || !(nd->flags & LOOKUP_CREATE))
* The 0 argument passed into the create function should one day
Index: linux-2.6.9-5.0.3.EL/fs/inode.c
===================================================================
---- linux-2.6.9-5.0.3.EL.orig/fs/inode.c 2005-02-26 14:28:01.389225664 +0200
-+++ linux-2.6.9-5.0.3.EL/fs/inode.c 2005-02-26 14:32:04.742230384 +0200
+--- linux-2.6.9-5.0.3.EL.orig/fs/inode.c 2005-02-26 14:28:01.000000000 +0200
++++ linux-2.6.9-5.0.3.EL/fs/inode.c 2005-02-26 23:29:02.000000000 +0200
@@ -233,6 +233,7 @@
inodes_stat.nr_unused--;
}
* @inode: inode to clear
Index: linux-2.6.9-5.0.3.EL/include/linux/dcache.h
===================================================================
---- linux-2.6.9-5.0.3.EL.orig/include/linux/dcache.h 2005-02-26 14:28:01.390225512 +0200
-+++ linux-2.6.9-5.0.3.EL/include/linux/dcache.h 2005-02-26 14:32:04.743230232 +0200
+--- linux-2.6.9-5.0.3.EL.orig/include/linux/dcache.h 2005-02-26 14:28:01.000000000 +0200
++++ linux-2.6.9-5.0.3.EL/include/linux/dcache.h 2005-02-26 23:29:02.000000000 +0200
@@ -4,6 +4,7 @@
#ifdef __KERNEL__
int nr_unused;
Index: linux-2.6.9-5.0.3.EL/include/linux/fs.h
===================================================================
---- linux-2.6.9-5.0.3.EL.orig/include/linux/fs.h 2005-02-26 14:28:01.393225056 +0200
-+++ linux-2.6.9-5.0.3.EL/include/linux/fs.h 2005-02-26 14:32:04.745229928 +0200
+--- linux-2.6.9-5.0.3.EL.orig/include/linux/fs.h 2005-02-26 14:28:01.000000000 +0200
++++ linux-2.6.9-5.0.3.EL/include/linux/fs.h 2005-02-26 23:29:02.000000000 +0200
@@ -74,6 +74,7 @@
#define FMODE_READ 1
Index: linux-2.6.9-5.0.3.EL/include/linux/namei.h
===================================================================
---- linux-2.6.9-5.0.3.EL.orig/include/linux/namei.h 2005-02-26 14:28:01.396224600 +0200
-+++ linux-2.6.9-5.0.3.EL/include/linux/namei.h 2005-02-26 14:32:04.747229624 +0200
+--- linux-2.6.9-5.0.3.EL.orig/include/linux/namei.h 2005-02-26 14:28:01.000000000 +0200
++++ linux-2.6.9-5.0.3.EL/include/linux/namei.h 2005-02-26 23:29:02.000000000 +0200
@@ -2,14 +2,48 @@
#define _LINUX_NAMEI_H
enum { MAX_NESTED_LINKS = 8 };
struct nameidata {
-@@ -21,10 +56,7 @@
+@@ -21,10 +55,7 @@
unsigned depth;
char *saved_names[MAX_NESTED_LINKS + 1];
};
/*
-@@ -46,6 +78,8 @@
+@@ -46,6 +77,8 @@
#define LOOKUP_PARENT 16
#define LOOKUP_NOALT 32
#define LOOKUP_ATOMIC 64
/*
* Intent data
-@@ -55,6 +89,12 @@
+@@ -55,6 +88,12 @@
#define LOOKUP_ACCESS (0x0400)
extern int FASTCALL(__user_walk(const char __user *, unsigned, struct nameidata *));
#define user_path_walk(name,nd) \
__user_walk(name, LOOKUP_FOLLOW, nd)
#define user_path_walk_link(name,nd) \
-@@ -67,7 +107,6 @@
+@@ -67,7 +106,6 @@
extern struct dentry * lookup_one_len(const char *, struct dentry *, int);
extern struct dentry * lookup_hash(struct qstr *, struct dentry *);
Index: linux-2.6.9-5.0.3.EL/include/linux/mount.h
===================================================================
---- linux-2.6.9-5.0.3.EL.orig/include/linux/mount.h 2005-02-26 14:28:01.397224448 +0200
-+++ linux-2.6.9-5.0.3.EL/include/linux/mount.h 2005-02-26 14:32:04.748229472 +0200
+--- linux-2.6.9-5.0.3.EL.orig/include/linux/mount.h 2005-02-26 14:28:01.000000000 +0200
++++ linux-2.6.9-5.0.3.EL/include/linux/mount.h 2005-02-26 23:29:02.000000000 +0200
@@ -34,6 +34,8 @@
struct list_head mnt_list;
struct list_head mnt_fslink; /* link in fs-specific expiry list */
static inline struct vfsmount *mntget(struct vfsmount *mnt)
Index: linux-2.6.9-5.0.3.EL/kernel/exit.c
===================================================================
---- linux-2.6.9-5.0.3.EL.orig/kernel/exit.c 2005-02-26 14:28:01.399224144 +0200
-+++ linux-2.6.9-5.0.3.EL/kernel/exit.c 2005-02-26 14:32:04.750229168 +0200
+--- linux-2.6.9-5.0.3.EL.orig/kernel/exit.c 2005-02-26 14:28:01.000000000 +0200
++++ linux-2.6.9-5.0.3.EL/kernel/exit.c 2005-02-26 23:29:02.000000000 +0200
@@ -244,6 +244,8 @@
write_unlock_irq(&tasklist_lock);
}