From f057b7b87c7ba0ea9b77e22b02b82e59a69d0d5a Mon Sep 17 00:00:00 2001 From: braam Date: Mon, 2 Jun 2003 09:33:25 +0000 Subject: [PATCH] - many further changes to clean up intent handling - indicate clearly to the FS when the last component is hit in lookup with an nd flag LOOKUP_TAIL - change prototype of lookup_it and revalidate_it to have struct nameidata * for this reason. - upshot: createmany works, finally! --- .../patches/vfs_intent_2.5.69_rev1.patch | 152 ++++++++++++++------- .../patches/vfs_nointent_2.5.69_rev1.patch | 102 ++++++-------- 2 files changed, 144 insertions(+), 110 deletions(-) diff --git a/lustre/kernel_patches/patches/vfs_intent_2.5.69_rev1.patch b/lustre/kernel_patches/patches/vfs_intent_2.5.69_rev1.patch index 27c82d2..66ca32b 100644 --- a/lustre/kernel_patches/patches/vfs_intent_2.5.69_rev1.patch +++ b/lustre/kernel_patches/patches/vfs_intent_2.5.69_rev1.patch @@ -1,18 +1,18 @@ fs/dcache.c | 15 ++++- - fs/namei.c | 132 ++++++++++++++++++++++++++++++++++++++++--------- + fs/namei.c | 144 +++++++++++++++++++++++++++++++++++++++---------- fs/namespace.c | 1 - fs/open.c | 66 ++++++++++++++++-------- + fs/open.c | 66 ++++++++++++++-------- fs/stat.c | 24 ++++++-- fs/sysfs/inode.c | 2 - include/linux/dcache.h | 33 ++++++++++++ + include/linux/dcache.h | 33 +++++++++++ include/linux/fs.h | 10 +++ - include/linux/namei.h | 8 ++ + include/linux/namei.h | 9 ++- kernel/ksyms.c | 7 ++ net/unix/af_unix.c | 2 - 11 files changed, 243 insertions(+), 57 deletions(-) + 11 files changed, 252 insertions(+), 61 deletions(-) --- uml-2.5/fs/sysfs/inode.c~vfs_intent_2.5.69_rev1 2003-05-30 03:33:20.000000000 -0600 -+++ uml-2.5-braam/fs/sysfs/inode.c 2003-05-31 22:24:46.000000000 -0600 ++++ uml-2.5-braam/fs/sysfs/inode.c 2003-06-02 02:13:24.000000000 -0600 @@ -80,7 +80,7 @@ struct dentry * sysfs_get_dentry(struct qstr.name = name; qstr.len = strlen(name); @@ -23,7 +23,7 @@ void sysfs_hash_and_remove(struct dentry * dir, const char * name) --- uml-2.5/fs/namei.c~vfs_intent_2.5.69_rev1 2003-05-30 03:33:15.000000000 -0600 -+++ uml-2.5-braam/fs/namei.c 2003-06-01 22:02:20.000000000 -0600 ++++ uml-2.5-braam/fs/namei.c 2003-06-02 03:04:25.000000000 -0600 @@ -263,8 +263,15 @@ int deny_write_access(struct file * file return 0; } @@ -45,7 +45,7 @@ * SMP-safe */ -static struct dentry * cached_lookup(struct dentry * parent, struct qstr * name, int flags) -+static struct dentry * cached_lookup(struct dentry * parent, struct qstr * name, int flags, struct lookup_intent *it) ++static struct dentry * cached_lookup(struct dentry * parent, struct qstr * name, int flags, struct nameidata *nd) { struct dentry * dentry = __d_lookup(parent, name); @@ -54,7 +54,7 @@ dentry = d_lookup(parent, name); + if (dentry && dentry->d_op && dentry->d_op->d_revalidate_it) { -+ if (!dentry->d_op->d_revalidate_it(dentry, flags, it) && ++ if (!dentry->d_op->d_revalidate_it(dentry, flags, nd) && + !d_invalidate(dentry)) { + dput(dentry); + dentry = NULL; @@ -69,7 +69,7 @@ * SMP-safe */ -static struct dentry * real_lookup(struct dentry * parent, struct qstr * name, int flags) -+static struct dentry * real_lookup(struct dentry * parent, struct qstr * name, int flags, struct lookup_intent *it) ++static struct dentry * real_lookup(struct dentry * parent, struct qstr * name, int flags, struct nameidata *nd) { struct dentry * result; struct inode *dir = parent->d_inode; @@ -79,7 +79,7 @@ if (dentry) { - result = dir->i_op->lookup(dir, dentry); + if (dir->i_op->lookup_it) -+ result = dir->i_op->lookup_it(dir, dentry, it); ++ result = dir->i_op->lookup_it(dir, dentry, nd); + else + result = dir->i_op->lookup(dir, dentry); if (result) @@ -90,7 +90,7 @@ result = ERR_PTR(-ENOENT); } + } else if (result->d_op && result->d_op->d_revalidate_it) { -+ if (!result->d_op->d_revalidate_it(result, flags, it) && ++ if (!result->d_op->d_revalidate_it(result, flags, nd) && + !d_invalidate(result)) { + dput(result); + result = ERR_PTR(-ENOENT); @@ -149,7 +149,7 @@ need_lookup: - dentry = real_lookup(nd->dentry, name, LOOKUP_CONTINUE); -+ dentry = real_lookup(nd->dentry, name, LOOKUP_CONTINUE, &nd->it); ++ dentry = real_lookup(nd->dentry, name, LOOKUP_CONTINUE, nd); if (IS_ERR(dentry)) goto fail; goto done; @@ -160,7 +160,7 @@ + dentry->d_op->d_revalidate(dentry, flags)) + goto done; + if (dentry->d_op->d_revalidate_it && -+ dentry->d_op->d_revalidate_it(dentry, flags, &nd->it)) ++ dentry->d_op->d_revalidate_it(dentry, flags, nd)) goto done; if (d_invalidate(dentry)) goto done; @@ -173,7 +173,17 @@ break; continue; /* here ends the main loop */ -@@ -724,7 +763,8 @@ last_component: +@@ -700,7 +739,9 @@ last_component: + if (err < 0) + break; + } ++ nd->flags |= LOOKUP_TAIL; + err = do_lookup(nd, &this, &next, 0); ++ nd->flags &= ~LOOKUP_TAIL; + if (err) + break; + follow_mount(&next.mnt, &next.dentry); +@@ -724,7 +765,8 @@ last_component: break; if (lookup_flags & LOOKUP_DIRECTORY) { err = -ENOTDIR; @@ -183,22 +193,22 @@ break; } goto return_base; -@@ -866,7 +906,8 @@ int path_lookup(const char *name, unsign +@@ -866,7 +908,8 @@ int path_lookup(const char *name, unsign * needs parent already locked. Doesn't follow mounts. * SMP-safe. */ -struct dentry * lookup_hash(struct qstr *name, struct dentry * base) +struct dentry * lookup_hash(struct qstr *name, struct dentry * base, -+ struct lookup_intent *it) ++ struct nameidata *nd) { struct dentry * dentry; struct inode *inode; -@@ -889,13 +930,16 @@ struct dentry * lookup_hash(struct qstr +@@ -889,13 +932,16 @@ struct dentry * lookup_hash(struct qstr goto out; } - dentry = cached_lookup(base, name, 0); -+ dentry = cached_lookup(base, name, 0, it); ++ dentry = cached_lookup(base, name, 0, nd); if (!dentry) { struct dentry *new = d_alloc(base, name); dentry = ERR_PTR(-ENOMEM); @@ -206,27 +216,27 @@ goto out; - dentry = inode->i_op->lookup(inode, new); + if (inode->i_op->lookup_it) -+ dentry = inode->i_op->lookup_it(inode, new, it); ++ dentry = inode->i_op->lookup_it(inode, new, nd); + else + dentry = inode->i_op->lookup(inode, new); if (!dentry) dentry = new; else -@@ -906,7 +950,7 @@ out: +@@ -906,7 +952,7 @@ out: } /* SMP-safe */ -struct dentry * lookup_one_len(const char * name, struct dentry * base, int len) -+struct dentry * lookup_one_len_it(const char * name, struct dentry * base, int len, struct lookup_intent *it) ++struct dentry * lookup_one_len_it(const char * name, struct dentry * base, int len, struct nameidata *nd) { unsigned long hash; struct qstr this; -@@ -926,11 +970,16 @@ struct dentry * lookup_one_len(const cha +@@ -926,11 +972,16 @@ struct dentry * lookup_one_len(const cha } this.hash = end_name_hash(hash); - return lookup_hash(&this, base); -+ return lookup_hash(&this, base, it); ++ return lookup_hash(&this, base, nd); access: return ERR_PTR(-EACCES); } @@ -239,7 +249,7 @@ /* * namei() * -@@ -942,10 +991,11 @@ access: +@@ -942,10 +993,11 @@ access: * that namei follows links, while lnamei does not. * SMP-safe */ @@ -252,7 +262,7 @@ if (!IS_ERR(tmp)) { err = path_lookup(tmp, flags, nd); -@@ -954,6 +1004,12 @@ int __user_walk(const char __user *name, +@@ -954,6 +1006,12 @@ int __user_walk(const char __user *name, return err; } @@ -265,7 +275,7 @@ /* * It's inline, so penalty for filesystems that don't use sticky bit is * minimal. -@@ -1093,6 +1149,32 @@ void unlock_rename(struct dentry *p1, st +@@ -1093,6 +1151,32 @@ void unlock_rename(struct dentry *p1, st } } @@ -298,7 +308,7 @@ int vfs_create(struct inode *dir, struct dentry *dentry, int mode) { int error = may_create(dir, dentry); -@@ -1232,6 +1314,9 @@ int open_namei(const char * pathname, in +@@ -1232,6 +1316,9 @@ int open_namei(const char * pathname, in /* * Create - we need to know the parent. */ @@ -308,16 +318,18 @@ error = path_lookup(pathname, LOOKUP_PARENT, nd); if (error) return error; -@@ -1247,7 +1332,7 @@ int open_namei(const char * pathname, in +@@ -1247,7 +1334,9 @@ int open_namei(const char * pathname, in dir = nd->dentry; down(&dir->d_inode->i_sem); - dentry = lookup_hash(&nd->last, nd->dentry); -+ dentry = lookup_hash(&nd->last, nd->dentry, &nd->it); ++ nd->flags |= LOOKUP_TAIL; ++ dentry = lookup_hash(&nd->last, nd->dentry, nd); ++ nd->flags &= ~LOOKUP_TAIL; do_last: error = PTR_ERR(dentry); -@@ -1255,12 +1340,13 @@ do_last: +@@ -1255,12 +1344,13 @@ do_last: up(&dir->d_inode->i_sem); goto exit; } @@ -333,7 +345,7 @@ up(&dir->d_inode->i_sem); dput(nd->dentry); nd->dentry = dentry; -@@ -1285,7 +1371,7 @@ do_last: +@@ -1285,7 +1375,7 @@ do_last: error = -ELOOP; if (flag & O_NOFOLLOW) goto exit_dput; @@ -342,7 +354,7 @@ } error = -ENOENT; if (!dentry->d_inode) -@@ -1328,7 +1414,7 @@ do_link: +@@ -1328,7 +1418,7 @@ do_link: if (error) goto exit_dput; UPDATE_ATIME(dentry->d_inode); @@ -351,26 +363,62 @@ dput(dentry); if (error) return error; -@@ -1350,7 +1436,7 @@ do_link: +@@ -1350,7 +1440,7 @@ do_link: } dir = nd->dentry; down(&dir->d_inode->i_sem); - dentry = lookup_hash(&nd->last, nd->dentry); -+ dentry = lookup_hash(&nd->last, nd->dentry, &nd->it); ++ dentry = lookup_hash(&nd->last, nd->dentry, nd); putname(nd->last.name); goto do_last; } -@@ -1364,7 +1450,7 @@ static struct dentry *lookup_create(stru +@@ -1364,7 +1454,7 @@ static struct dentry *lookup_create(stru dentry = ERR_PTR(-EEXIST); if (nd->last_type != LAST_NORM) goto fail; - dentry = lookup_hash(&nd->last, nd->dentry); -+ dentry = lookup_hash(&nd->last, nd->dentry, &nd->it); ++ dentry = lookup_hash(&nd->last, nd->dentry, nd); if (IS_ERR(dentry)) goto fail; if (!is_dir && nd->last.name[nd->last.len] && !dentry->d_inode) +@@ -1596,7 +1686,7 @@ asmlinkage long sys_rmdir(const char __u + goto exit1; + } + down(&nd.dentry->d_inode->i_sem); +- dentry = lookup_hash(&nd.last, nd.dentry); ++ dentry = lookup_hash(&nd.last, nd.dentry, &nd); + error = PTR_ERR(dentry); + if (!IS_ERR(dentry)) { + error = vfs_rmdir(nd.dentry->d_inode, dentry); +@@ -1663,7 +1753,7 @@ asmlinkage long sys_unlink(const char __ + if (nd.last_type != LAST_NORM) + goto exit1; + down(&nd.dentry->d_inode->i_sem); +- dentry = lookup_hash(&nd.last, nd.dentry); ++ dentry = lookup_hash(&nd.last, nd.dentry, &nd); + error = PTR_ERR(dentry); + if (!IS_ERR(dentry)) { + /* Why not before? Because we want correct error value */ +@@ -2013,7 +2103,7 @@ static inline int do_rename(const char * + + trap = lock_rename(new_dir, old_dir); + +- old_dentry = lookup_hash(&oldnd.last, old_dir); ++ old_dentry = lookup_hash(&oldnd.last, old_dir, &oldnd); + error = PTR_ERR(old_dentry); + if (IS_ERR(old_dentry)) + goto exit3; +@@ -2033,7 +2123,7 @@ static inline int do_rename(const char * + error = -EINVAL; + if (old_dentry == trap) + goto exit4; +- new_dentry = lookup_hash(&newnd.last, new_dir); ++ new_dentry = lookup_hash(&newnd.last, new_dir, &newnd); + error = PTR_ERR(new_dentry); + if (IS_ERR(new_dentry)) + goto exit4; --- uml-2.5/fs/dcache.c~vfs_intent_2.5.69_rev1 2003-05-30 03:33:15.000000000 -0600 -+++ uml-2.5-braam/fs/dcache.c 2003-05-31 22:24:46.000000000 -0600 ++++ uml-2.5-braam/fs/dcache.c 2003-06-02 02:13:24.000000000 -0600 @@ -1134,14 +1134,23 @@ void d_delete(struct dentry * dentry) * Adds a dentry to the hash according to its name. */ @@ -399,7 +447,7 @@ #define do_switch(x,y) do { \ --- uml-2.5/fs/namespace.c~vfs_intent_2.5.69_rev1 2003-05-30 03:33:16.000000000 -0600 -+++ uml-2.5-braam/fs/namespace.c 2003-05-31 22:24:46.000000000 -0600 ++++ uml-2.5-braam/fs/namespace.c 2003-06-02 02:13:24.000000000 -0600 @@ -927,6 +927,7 @@ void set_fs_pwd(struct fs_struct *fs, st mntput(old_pwdmnt); } @@ -409,7 +457,7 @@ static void chroot_fs_refs(struct nameidata *old_nd, struct nameidata *new_nd) { --- uml-2.5/fs/open.c~vfs_intent_2.5.69_rev1 2003-05-30 03:33:16.000000000 -0600 -+++ uml-2.5-braam/fs/open.c 2003-06-01 21:54:37.000000000 -0600 ++++ uml-2.5-braam/fs/open.c 2003-06-02 02:13:24.000000000 -0600 @@ -97,7 +97,7 @@ static inline long do_sys_truncate(const struct nameidata nd; struct inode * inode; @@ -558,7 +606,7 @@ * Find an empty file descriptor entry, and mark it busy. */ --- uml-2.5/fs/stat.c~vfs_intent_2.5.69_rev1 2003-05-30 03:33:16.000000000 -0600 -+++ uml-2.5-braam/fs/stat.c 2003-06-01 22:00:14.000000000 -0600 ++++ uml-2.5-braam/fs/stat.c 2003-06-02 02:13:24.000000000 -0600 @@ -33,7 +33,7 @@ void generic_fillattr(struct inode *inod stat->blksize = inode->i_blksize; } @@ -631,7 +679,7 @@ } --- uml-2.5/include/linux/dcache.h~vfs_intent_2.5.69_rev1 2003-05-30 03:33:40.000000000 -0600 -+++ uml-2.5-braam/include/linux/dcache.h 2003-06-01 22:02:38.000000000 -0600 ++++ uml-2.5-braam/include/linux/dcache.h 2003-06-02 02:13:24.000000000 -0600 @@ -4,6 +4,7 @@ #ifdef __KERNEL__ @@ -686,7 +734,7 @@ int (*d_delete)(struct dentry *); void (*d_release)(struct dentry *); void (*d_iput)(struct dentry *, struct inode *); -+ int (*d_revalidate_it)(struct dentry *, int, struct lookup_intent *); ++ int (*d_revalidate_it)(struct dentry *, int, struct nameidata *); + void (*d_it_release)(struct dentry *, struct lookup_intent *); }; @@ -701,7 +749,7 @@ extern spinlock_t dcache_lock; --- uml-2.5/include/linux/fs.h~vfs_intent_2.5.69_rev1 2003-05-30 03:33:41.000000000 -0600 -+++ uml-2.5-braam/include/linux/fs.h 2003-06-01 00:13:35.000000000 -0600 ++++ uml-2.5-braam/include/linux/fs.h 2003-06-02 02:13:24.000000000 -0600 @@ -237,6 +237,9 @@ typedef int (get_blocks_t)(struct inode #define ATTR_ATTR_FLAG 1024 #define ATTR_KILL_SUID 2048 @@ -719,7 +767,7 @@ + int (*create_it) (struct inode *,struct dentry *,int, struct nameidata *); struct dentry * (*lookup) (struct inode *,struct dentry *); + struct dentry * (*lookup_it) (struct inode *,struct dentry *, -+ struct lookup_intent *); ++ struct nameidata *); int (*link) (struct dentry *,struct inode *,struct dentry *); int (*unlink) (struct inode *,struct dentry *); int (*symlink) (struct inode *,struct dentry *,const char *); @@ -750,7 +798,7 @@ extern int vfs_permission(struct inode *, int); extern int get_write_access(struct inode *); --- uml-2.5/include/linux/namei.h~vfs_intent_2.5.69_rev1 2003-05-30 03:33:42.000000000 -0600 -+++ uml-2.5-braam/include/linux/namei.h 2003-06-01 21:49:20.000000000 -0600 ++++ uml-2.5-braam/include/linux/namei.h 2003-06-02 02:39:14.000000000 -0600 @@ -11,6 +11,7 @@ struct nameidata { struct qstr last; unsigned int flags; @@ -759,7 +807,11 @@ }; /* -@@ -34,17 +35,22 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LA +@@ -31,20 +32,26 @@ enum {LAST_NORM, LAST_ROOT, LAST_DOT, LA + #define LOOKUP_CONTINUE 4 + #define LOOKUP_PARENT 16 + #define LOOKUP_NOALT 32 ++#define LOOKUP_TAIL 64 extern int FASTCALL(__user_walk(const char __user *, unsigned, struct nameidata *)); @@ -779,12 +831,12 @@ extern struct dentry * lookup_one_len(const char *, struct dentry *, int); -extern struct dentry * lookup_hash(struct qstr *, struct dentry *); -+extern struct dentry * lookup_hash(struct qstr *, struct dentry *, struct lookup_intent *); ++extern struct dentry * lookup_hash(struct qstr *, struct dentry *, struct nameidata *); extern int follow_down(struct vfsmount **, struct dentry **); extern int follow_up(struct vfsmount **, struct dentry **); --- uml-2.5/kernel/ksyms.c~vfs_intent_2.5.69_rev1 2003-05-30 03:33:49.000000000 -0600 -+++ uml-2.5-braam/kernel/ksyms.c 2003-05-31 22:24:46.000000000 -0600 ++++ uml-2.5-braam/kernel/ksyms.c 2003-06-02 02:13:24.000000000 -0600 @@ -374,6 +374,7 @@ EXPORT_SYMBOL(unregister_filesystem); EXPORT_SYMBOL(kern_mount); EXPORT_SYMBOL(__mntput); @@ -807,7 +859,7 @@ EXPORT_SYMBOL(add_wait_queue); EXPORT_SYMBOL(add_wait_queue_exclusive); --- uml-2.5/net/unix/af_unix.c~vfs_intent_2.5.69_rev1 2003-05-30 03:33:52.000000000 -0600 -+++ uml-2.5-braam/net/unix/af_unix.c 2003-05-31 22:24:46.000000000 -0600 ++++ uml-2.5-braam/net/unix/af_unix.c 2003-06-02 02:13:24.000000000 -0600 @@ -721,7 +721,7 @@ static int unix_bind(struct socket *sock /* * Do the final lookup. diff --git a/lustre/kernel_patches/patches/vfs_nointent_2.5.69_rev1.patch b/lustre/kernel_patches/patches/vfs_nointent_2.5.69_rev1.patch index 0e8ddd5..1930399 100644 --- a/lustre/kernel_patches/patches/vfs_nointent_2.5.69_rev1.patch +++ b/lustre/kernel_patches/patches/vfs_nointent_2.5.69_rev1.patch @@ -1,11 +1,11 @@ fs/exec.c | 2 - - fs/namei.c | 82 +++++++++++++++++++++++++++++++++++++++++++++++------ - fs/open.c | 73 ++++++++++++++++++++++++++++++++++++++++------- - include/linux/fs.h | 9 +++++ - 4 files changed, 145 insertions(+), 21 deletions(-) + fs/namei.c | 75 +++++++++++++++++++++++++++++++++++++++++++++++++---- + fs/open.c | 73 ++++++++++++++++++++++++++++++++++++++++++++------- + include/linux/fs.h | 9 +++++- + 4 files changed, 142 insertions(+), 17 deletions(-) ---- uml-2.5/fs/namei.c~vfs_nointent_2.5.69_rev1 2003-06-01 22:02:20.000000000 -0600 -+++ uml-2.5-braam/fs/namei.c 2003-06-01 22:19:39.000000000 -0600 +--- uml-2.5/fs/namei.c~vfs_nointent_2.5.69_rev1 2003-06-02 02:03:34.000000000 -0600 ++++ uml-2.5-braam/fs/namei.c 2003-06-02 02:13:05.000000000 -0600 @@ -1260,7 +1260,7 @@ int may_open(struct nameidata *nd, int a if (!error) { DQUOT_INIT(inode); @@ -82,26 +82,23 @@ name = getname(pathname); if(IS_ERR(name)) -@@ -1681,8 +1702,18 @@ asmlinkage long sys_rmdir(const char __u +@@ -1681,6 +1702,16 @@ asmlinkage long sys_rmdir(const char __u error = -EBUSY; goto exit1; } -+ -+ if (nd.dentry->d_inode->i_op->rmdir_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ -+ error = op->rmdir_raw(&nd); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto exit1; -+ } -+ ++ ++ if (nd.dentry->d_inode->i_op->rmdir_raw) { ++ struct inode_operations *op = nd.dentry->d_inode->i_op; ++ ++ error = op->rmdir_raw(&nd); ++ /* the file system wants to use normal vfs path now */ ++ if (error != -EOPNOTSUPP) ++ goto exit1; ++ } ++ down(&nd.dentry->d_inode->i_sem); -- dentry = lookup_hash(&nd.last, nd.dentry); -+ dentry = lookup_hash(&nd.last, nd.dentry, &nd.it); + dentry = lookup_hash(&nd.last, nd.dentry, &nd); error = PTR_ERR(dentry); - if (!IS_ERR(dentry)) { - error = vfs_rmdir(nd.dentry->d_inode, dentry); @@ -1737,6 +1768,7 @@ asmlinkage long sys_unlink(const char __ struct dentry *dentry; struct nameidata nd; @@ -110,23 +107,20 @@ name = getname(pathname); if(IS_ERR(name)) -@@ -1748,8 +1780,15 @@ asmlinkage long sys_unlink(const char __ +@@ -1748,6 +1780,13 @@ asmlinkage long sys_unlink(const char __ error = -EISDIR; if (nd.last_type != LAST_NORM) goto exit1; -+ if (nd.dentry->d_inode->i_op->unlink_raw) { -+ struct inode_operations *op = nd.dentry->d_inode->i_op; -+ error = op->unlink_raw(&nd); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto exit1; -+ } ++ if (nd.dentry->d_inode->i_op->unlink_raw) { ++ struct inode_operations *op = nd.dentry->d_inode->i_op; ++ error = op->unlink_raw(&nd); ++ /* the file system wants to use normal vfs path now */ ++ if (error != -EOPNOTSUPP) ++ goto exit1; ++ } down(&nd.dentry->d_inode->i_sem); -- dentry = lookup_hash(&nd.last, nd.dentry); -+ dentry = lookup_hash(&nd.last, nd.dentry, NULL); + dentry = lookup_hash(&nd.last, nd.dentry, &nd); error = PTR_ERR(dentry); - if (!IS_ERR(dentry)) { - /* Why not before? Because we want correct error value */ @@ -1815,10 +1854,18 @@ asmlinkage long sys_symlink(const char _ if (!IS_ERR(to)) { struct dentry *dentry; @@ -204,33 +198,21 @@ error = path_lookup(oldname, LOOKUP_PARENT, &oldnd); if (error) -@@ -2097,9 +2156,15 @@ static inline int do_rename(const char * +@@ -2097,6 +2156,13 @@ static inline int do_rename(const char * if (newnd.last_type != LAST_NORM) goto exit2; -+ if (old_dir->d_inode->i_op->rename_raw) { -+ error = old_dir->d_inode->i_op->rename_raw(&oldnd, &newnd); -+ /* the file system wants to use normal vfs path now */ -+ if (error != -EOPNOTSUPP) -+ goto exit2; -+ } ++ if (old_dir->d_inode->i_op->rename_raw) { ++ error = old_dir->d_inode->i_op->rename_raw(&oldnd, &newnd); ++ /* the file system wants to use normal vfs path now */ ++ if (error != -EOPNOTSUPP) ++ goto exit2; ++ } ++ trap = lock_rename(new_dir, old_dir); -- old_dentry = lookup_hash(&oldnd.last, old_dir); -+ old_dentry = lookup_hash(&oldnd.last, old_dir, &oldnd.it); - error = PTR_ERR(old_dentry); - if (IS_ERR(old_dentry)) - goto exit3; -@@ -2119,7 +2184,7 @@ static inline int do_rename(const char * - error = -EINVAL; - if (old_dentry == trap) - goto exit4; -- new_dentry = lookup_hash(&newnd.last, new_dir); -+ new_dentry = lookup_hash(&newnd.last, new_dir, &newnd.it); - error = PTR_ERR(new_dentry); - if (IS_ERR(new_dentry)) - goto exit4; -@@ -2128,8 +2193,7 @@ static inline int do_rename(const char * + old_dentry = lookup_hash(&oldnd.last, old_dir, &oldnd); +@@ -2128,8 +2194,7 @@ static inline int do_rename(const char * if (new_dentry == trap) goto exit5; @@ -241,7 +223,7 @@ dput(new_dentry); exit4: --- uml-2.5/fs/open.c~vfs_nointent_2.5.69_rev1 2003-06-01 21:54:37.000000000 -0600 -+++ uml-2.5-braam/fs/open.c 2003-06-01 22:06:02.000000000 -0600 ++++ uml-2.5-braam/fs/open.c 2003-06-02 02:10:20.000000000 -0600 @@ -75,9 +75,10 @@ out: return error; } @@ -380,11 +362,11 @@ down(&inode->i_sem); error = notify_change(dentry, &newattrs); up(&inode->i_sem); ---- uml-2.5/include/linux/fs.h~vfs_nointent_2.5.69_rev1 2003-06-01 00:13:35.000000000 -0600 -+++ uml-2.5-braam/include/linux/fs.h 2003-06-01 22:06:02.000000000 -0600 +--- uml-2.5/include/linux/fs.h~vfs_nointent_2.5.69_rev1 2003-06-02 01:59:43.000000000 -0600 ++++ uml-2.5-braam/include/linux/fs.h 2003-06-02 02:10:20.000000000 -0600 @@ -737,13 +737,20 @@ struct inode_operations { struct dentry * (*lookup_it) (struct inode *,struct dentry *, - struct lookup_intent *); + struct nameidata *); int (*link) (struct dentry *,struct inode *,struct dentry *); + int (*link_raw) (struct nameidata *,struct nameidata *); int (*unlink) (struct inode *,struct dentry *); @@ -413,7 +395,7 @@ extern struct file *filp_open(const char *, int, int); extern struct file * dentry_open(struct dentry *, struct vfsmount *, int); --- uml-2.5/fs/exec.c~vfs_nointent_2.5.69_rev1 2003-05-31 22:26:50.000000000 -0600 -+++ uml-2.5-braam/fs/exec.c 2003-06-01 22:06:02.000000000 -0600 ++++ uml-2.5-braam/fs/exec.c 2003-06-02 02:10:20.000000000 -0600 @@ -1353,7 +1353,7 @@ int do_coredump(long signr, int exit_cod goto close_fail; if (!file->f_op->write) -- 1.8.3.1