{
struct dentry *dentry;
struct inode *inode;
-@@ -526,19 +579,18 @@
+@@ -526,18 +579,18 @@
break;
}
/* This does the actual lookups.. */
}
/* Check mountpoints.. */
- while (d_mountpoint(dentry) && __follow_down(&nd->mnt, &dentry))
-- ;
-+ while (d_mountpoint(dentry) && __follow_down(&nd->mnt, &dentry, NULL));
++ while (d_mountpoint(dentry) && __follow_down(&nd->mnt, &dentry, NULL))
+ ;
err = -ENOENT;
- inode = dentry->d_inode;
@@ -549,7 +601,7 @@
goto out_dput;
+ if (err)
+ break;
+ new = real_lookup(dentry->d_parent,
-+ &dentry->d_name, 0, NULL);
++ &dentry->d_name, 0, it);
+ d_invalidate(dentry);
+ dput(dentry);
+ if (IS_ERR(new)) {
int retval = 0;
int mnt_flags = 0;
-@@ -722,10 +729,11 @@
+@@ -722,9 +729,11 @@
flags &= ~(MS_NOSUID|MS_NOEXEC|MS_NODEV);
/* ... and get the mountpoint */
+ if (retval) {
+ intent_release(&it);
return retval;
--
+ }
+
if (flags & MS_REMOUNT)
retval = do_remount(&nd, flags & ~MS_REMOUNT, mnt_flags,
- data_page);
@@ -736,6 +744,8 @@
else
retval = do_add_mount(&nd, type_page, flags, mnt_flags,
- error = __user_walk(filename, LOOKUP_POSITIVE | LOOKUP_FOLLOW |
- LOOKUP_DIRECTORY | LOOKUP_NOALT, &nd);
+ error = __user_walk_it(filename, LOOKUP_POSITIVE | LOOKUP_FOLLOW |
-+ LOOKUP_DIRECTORY | LOOKUP_NOALT, &nd, &it);
++ LOOKUP_DIRECTORY | LOOKUP_NOALT, &nd, &it);
if (error)
goto out;
#define ATTR_ATTR_FLAG 1024
+#define ATTR_RAW 0x0800 /* file system, not vfs will massage attrs */
+#define ATTR_FROM_OPEN 0x1000 /* called from open path, ie O_TRUNC */
-+#define ATTR_CTIME_SET 0x2000
++#define ATTR_CTIME_SET 0x2000
/*
* This is the Inode Attributes structure, used for notify_change(). It
dput(old_pwd);
mntput(old_pwdmnt);
}
-Index: linux-2.4.20/kernel/ksyms.c
+Index: linux-2.4.20/kernel/exit.c
===================================================================
---- linux-2.4.20.orig/kernel/ksyms.c Wed Mar 17 13:57:11 2004
-+++ linux-2.4.20/kernel/ksyms.c Wed Mar 17 13:57:11 2004
-@@ -297,6 +297,7 @@
- EXPORT_SYMBOL(set_page_dirty);
- EXPORT_SYMBOL(vfs_readlink);
- EXPORT_SYMBOL(vfs_follow_link);
-+EXPORT_SYMBOL(vfs_follow_link_it);
- EXPORT_SYMBOL(page_readlink);
- EXPORT_SYMBOL(page_follow_link);
- EXPORT_SYMBOL(page_symlink_inode_operations);
+--- linux-2.4.20.orig/kernel/exit.c Wed Mar 17 13:57:05 2004
++++ linux-2.4.20/kernel/exit.c Wed Mar 17 13:57:11 2004
+@@ -345,11 +345,14 @@
+ {
+ /* No need to hold fs->lock if we are killing it */
+ if (atomic_dec_and_test(&fs->count)) {
++ UNPIN(fs->pwd, fs->pwdmnt, 0);
++ UNPIN(fs->root, fs->rootmnt, 1);
+ dput(fs->root);
+ mntput(fs->rootmnt);
+ dput(fs->pwd);
+ mntput(fs->pwdmnt);
+ if (fs->altroot) {
++ UNPIN(fs->altroot, fs->altrootmnt, 1);
+ dput(fs->altroot);
+ mntput(fs->altrootmnt);
+ }
Index: linux-2.4.20/kernel/fork.c
===================================================================
--- linux-2.4.20.orig/kernel/fork.c Wed Mar 17 13:57:05 2004
fs->altrootmnt = mntget(old->altrootmnt);
fs->altroot = dget(old->altroot);
} else {
-Index: linux-2.4.20/kernel/exit.c
+Index: linux-2.4.20/kernel/ksyms.c
===================================================================
---- linux-2.4.20.orig/kernel/exit.c Wed Mar 17 13:57:05 2004
-+++ linux-2.4.20/kernel/exit.c Wed Mar 17 13:57:11 2004
-@@ -345,11 +345,14 @@
- {
- /* No need to hold fs->lock if we are killing it */
- if (atomic_dec_and_test(&fs->count)) {
-+ UNPIN(fs->pwd, fs->pwdmnt, 0);
-+ UNPIN(fs->root, fs->rootmnt, 1);
- dput(fs->root);
- mntput(fs->rootmnt);
- dput(fs->pwd);
- mntput(fs->pwdmnt);
- if (fs->altroot) {
-+ UNPIN(fs->altroot, fs->altrootmnt, 1);
- dput(fs->altroot);
- mntput(fs->altrootmnt);
- }
+--- linux-2.4.20.orig/kernel/ksyms.c Wed Mar 17 13:57:11 2004
++++ linux-2.4.20/kernel/ksyms.c Wed Mar 17 13:57:11 2004
+@@ -297,6 +297,7 @@
+ EXPORT_SYMBOL(set_page_dirty);
+ EXPORT_SYMBOL(vfs_readlink);
+ EXPORT_SYMBOL(vfs_follow_link);
++EXPORT_SYMBOL(vfs_follow_link_it);
+ EXPORT_SYMBOL(page_readlink);
+ EXPORT_SYMBOL(page_follow_link);
+ EXPORT_SYMBOL(page_symlink_inode_operations);