Whamcloud - gitweb
land v0.9.1 on HEAD, in preparation for a 1.0.x branch
[fs/lustre-release.git] / lustre / kernel_patches / patches / vfs_nointent_2.6.0-test1.patch
@@ -1,12 +1,8 @@
- fs/exec.c          |    2 -
- fs/namei.c         |   75 +++++++++++++++++++++++++++++++++++++++++++++++++----
- fs/open.c          |   73 ++++++++++++++++++++++++++++++++++++++++++++-------
- include/linux/fs.h |    9 +++++-
- 4 files changed, 142 insertions(+), 17 deletions(-)
+ 0 files changed
 
---- uml-2.5/fs/namei.c~vfs_nointent_2.5.69_rev1        2003-06-20 00:04:07.000000000 -0600
-+++ uml-2.5-braam/fs/namei.c   2003-06-20 06:22:37.000000000 -0600
-@@ -1279,7 +1279,7 @@ int may_open(struct nameidata *nd, int a
+--- linux-2.6.0-test1/fs/namei.c~vfs_nointent_2.6.0-test1      2003-07-22 20:18:30.000000000 +0800
++++ linux-2.6.0-test1-root/fs/namei.c  2003-07-22 20:27:38.000000000 +0800
+@@ -1249,7 +1249,7 @@ int may_open(struct nameidata *nd, int a
                if (!error) {
                        DQUOT_INIT(inode);
                        
                }
                put_write_access(inode);
                if (error)
-@@ -1517,6 +1517,7 @@ asmlinkage long sys_mknod(const char __u
-       char * tmp;
-       struct dentry * dentry;
+@@ -1494,6 +1494,7 @@ do_mknod(const char __user *filename, in
+       char *tmp;
+       struct dentry *dentry;
        struct nameidata nd;
-+      intent_init(&nd.it, IT_LOOKUP, 0);
++      intent_init(&nd.intent, IT_LOOKUP);
  
        if (S_ISDIR(mode))
                return -EPERM;
-@@ -1527,6 +1528,15 @@ asmlinkage long sys_mknod(const char __u
+@@ -1504,6 +1505,15 @@ do_mknod(const char __user *filename, in
        error = path_lookup(tmp, LOOKUP_PARENT, &nd);
        if (error)
                goto out;
@@ -39,7 +35,7 @@
        dentry = lookup_create(&nd, 0);
        error = PTR_ERR(dentry);
  
-@@ -1549,6 +1559,7 @@ asmlinkage long sys_mknod(const char __u
+@@ -1526,6 +1536,7 @@ do_mknod(const char __user *filename, in
                dput(dentry);
        }
        up(&nd.dentry->d_inode->i_sem);
        path_release(&nd);
  out:
        putname(tmp);
-@@ -1590,10 +1601,18 @@ asmlinkage long sys_mkdir(const char __u
+@@ -1588,10 +1599,18 @@ asmlinkage long sys_mkdir(const char __u
        if (!IS_ERR(tmp)) {
                struct dentry *dentry;
                struct nameidata nd;
-+                intent_init(&nd.it, IT_LOOKUP, 0);
++                intent_init(&nd.intent, IT_LOOKUP);
  
                error = path_lookup(tmp, LOOKUP_PARENT, &nd);
                if (error)
@@ -66,7 +62,7 @@
                dentry = lookup_create(&nd, 1);
                error = PTR_ERR(dentry);
                if (!IS_ERR(dentry)) {
-@@ -1603,6 +1622,7 @@ asmlinkage long sys_mkdir(const char __u
+@@ -1601,6 +1620,7 @@ asmlinkage long sys_mkdir(const char __u
                        dput(dentry);
                }
                up(&nd.dentry->d_inode->i_sem);
                path_release(&nd);
  out:
                putname(tmp);
-@@ -1683,6 +1703,7 @@ asmlinkage long sys_rmdir(const char __u
+@@ -1681,6 +1701,7 @@ asmlinkage long sys_rmdir(const char __u
        char * name;
        struct dentry *dentry;
        struct nameidata nd;
-+        intent_init(&nd.it, IT_LOOKUP, 0);
++        intent_init(&nd.intent, IT_LOOKUP);
  
        name = getname(pathname);
        if(IS_ERR(name))
-@@ -1703,6 +1724,16 @@ asmlinkage long sys_rmdir(const char __u
+@@ -1701,6 +1722,16 @@ asmlinkage long sys_rmdir(const char __u
                        error = -EBUSY;
                        goto exit1;
        }
 +      }
 + 
        down(&nd.dentry->d_inode->i_sem);
-       dentry = lookup_hash(&nd.last, nd.dentry, &nd);
+       dentry = lookup_hash(&nd.last, nd.dentry);
        error = PTR_ERR(dentry);
 @@ -1759,6 +1790,7 @@ asmlinkage long sys_unlink(const char __
        struct dentry *dentry;
        struct nameidata nd;
        struct inode *inode = NULL;
-+        intent_init(&nd.it, IT_LOOKUP, 0);
++        intent_init(&nd.intent, IT_LOOKUP);
  
        name = getname(pathname);
        if(IS_ERR(name))
 +                      goto exit1;
 +      }
        down(&nd.dentry->d_inode->i_sem);
-       dentry = lookup_hash(&nd.last, nd.dentry, &nd);
+       dentry = lookup_hash(&nd.last, nd.dentry);
        error = PTR_ERR(dentry);
 @@ -1837,10 +1876,18 @@ asmlinkage long sys_symlink(const char _
        if (!IS_ERR(to)) {
                struct dentry *dentry;
                struct nameidata nd;
-+                intent_init(&nd.it, IT_LOOKUP, 0);
++                intent_init(&nd.intent, IT_LOOKUP);
  
                error = path_lookup(to, LOOKUP_PARENT, &nd);
                if (error)
        struct nameidata nd, old_nd;
        int error;
        char * to;
-+        intent_init(&nd.it, IT_LOOKUP, 0);
-+        intent_init(&old_nd.it, IT_LOOKUP, 0);
++        intent_init(&nd.intent, IT_LOOKUP);
++        intent_init(&old_nd.intent, IT_LOOKUP);
  
        to = getname(newname);
        if (IS_ERR(to))
        struct dentry * old_dentry, *new_dentry;
        struct dentry * trap;
        struct nameidata oldnd, newnd;
-+        intent_init(&oldnd.it, IT_LOOKUP, 0);
-+        intent_init(&newnd.it, IT_LOOKUP, 0);
++        intent_init(&oldnd.intent, IT_LOOKUP);
++        intent_init(&newnd.intent, IT_LOOKUP);
  
        error = path_lookup(oldname, LOOKUP_PARENT, &oldnd);
        if (error)
 +
        trap = lock_rename(new_dir, old_dir);
  
-       old_dentry = lookup_hash(&oldnd.last, old_dir, &oldnd);
+       old_dentry = lookup_hash(&oldnd.last, old_dir);
 @@ -2150,8 +2216,7 @@ static inline int do_rename(const char *
        if (new_dentry == trap)
                goto exit5;
  exit5:
        dput(new_dentry);
  exit4:
---- uml-2.5/fs/open.c~vfs_nointent_2.5.69_rev1 2003-06-18 21:42:57.000000000 -0600
-+++ uml-2.5-braam/fs/open.c    2003-06-20 06:22:37.000000000 -0600
-@@ -75,9 +75,10 @@ out:
+--- linux-2.6.0-test1/fs/open.c~vfs_nointent_2.6.0-test1       2003-07-22 20:18:30.000000000 +0800
++++ linux-2.6.0-test1-root/fs/open.c   2003-07-22 20:26:41.000000000 +0800
+@@ -178,9 +178,10 @@ out:
        return error;
  }
  
        struct iattr newattrs;
  
        /* Not pretty: "inode->i_size" shouldn't really be signed. But it is. */
-@@ -87,7 +88,14 @@ int do_truncate(struct dentry *dentry, l
+@@ -190,7 +191,14 @@ int do_truncate(struct dentry *dentry, l
        newattrs.ia_size = length;
        newattrs.ia_valid = ATTR_SIZE | ATTR_CTIME;
        down(&dentry->d_inode->i_sem);
        up(&dentry->d_inode->i_sem);
        return err;
  }
-@@ -142,7 +150,7 @@ static inline long do_sys_truncate(const
+@@ -245,7 +253,7 @@ static inline long do_sys_truncate(const
        error = locks_verify_truncate(inode, NULL, length);
        if (!error) {
                DQUOT_INIT(inode);
        }
        put_write_access(inode);
  
-@@ -194,7 +202,7 @@ static inline long do_sys_ftruncate(unsi
+@@ -297,7 +305,7 @@ static inline long do_sys_ftruncate(unsi
  
        error = locks_verify_truncate(inode, file, length);
        if (!error)
  out_putf:
        fput(file);
  out:
-@@ -265,9 +273,19 @@ asmlinkage long sys_utime(char __user * 
-                   (error = permission(inode,MAY_WRITE)) != 0)
+@@ -368,9 +376,19 @@ asmlinkage long sys_utime(char __user * 
+                   (error = permission(inode,MAY_WRITE,&nd)) != 0)
                        goto dput_and_out;
        }
 -      down(&inode->i_sem);
  dput_and_out:
        path_release(&nd);
  out:
-@@ -310,9 +328,19 @@ long do_utimes(char __user * filename, s
-                   (error = permission(inode,MAY_WRITE)) != 0)
+@@ -413,9 +431,19 @@ long do_utimes(char __user * filename, s
+                   (error = permission(inode,MAY_WRITE,&nd)) != 0)
                        goto dput_and_out;
        }
 -      down(&inode->i_sem);
  dput_and_out:
        path_release(&nd);
  out:
-@@ -513,6 +541,18 @@ asmlinkage long sys_chmod(const char __u
+@@ -616,6 +644,18 @@ asmlinkage long sys_chmod(const char __u
        if (IS_RDONLY(inode))
                goto dput_and_out;
        
        error = -EPERM;
        if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
                goto dput_and_out;
-@@ -546,6 +586,18 @@ static int chown_common(struct dentry * 
+@@ -649,6 +689,18 @@ static int chown_common(struct dentry * 
        if (IS_RDONLY(inode))
                goto out;
        error = -EPERM;
        if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
                goto out;
        newattrs.ia_valid =  ATTR_CTIME;
-@@ -559,6 +611,7 @@ static int chown_common(struct dentry * 
+@@ -662,6 +714,7 @@ static int chown_common(struct dentry * 
        }
        if (!S_ISDIR(inode->i_mode))
                newattrs.ia_valid |= ATTR_KILL_SUID|ATTR_KILL_SGID;
        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-18 21:40:58.000000000 -0600
-+++ uml-2.5-braam/include/linux/fs.h   2003-06-20 06:22:37.000000000 -0600
-@@ -738,13 +738,20 @@ struct inode_operations {
-       struct dentry * (*lookup_it) (struct inode *,struct dentry *,
-                                       struct nameidata *);
+--- linux-2.6.0-test1/include/linux/fs.h~vfs_nointent_2.6.0-test1      2003-07-22 20:18:30.000000000 +0800
++++ linux-2.6.0-test1-root/include/linux/fs.h  2003-07-22 20:26:41.000000000 +0800
+@@ -807,13 +807,20 @@ struct inode_operations {
+       int (*create) (struct inode *,struct dentry *,int, struct nameidata *);
+       struct dentry * (*lookup) (struct inode *,struct dentry *, struct nameidata *);
        int (*link) (struct dentry *,struct inode *,struct dentry *);
 +      int (*link_raw) (struct nameidata *,struct nameidata *);
        int (*unlink) (struct inode *,struct dentry *);
        int (*readlink) (struct dentry *, char __user *,int);
        int (*follow_link) (struct dentry *, struct nameidata *);
        void (*truncate) (struct inode *);
-@@ -1029,7 +1036,7 @@ static inline int break_lease(struct ino
+@@ -1098,7 +1105,7 @@ static inline int break_lease(struct ino
  
- asmlinkage long sys_open(const char *, int, int);
+ asmlinkage long sys_open(const char __user *, int, int);
  asmlinkage long sys_close(unsigned int);      /* yes, it's really unsigned */
 -extern int do_truncate(struct dentry *, loff_t start);
 +extern int do_truncate(struct dentry *, loff_t start, int called_from_open);
  
  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-06-04 21:29:14.000000000 -0600
-+++ uml-2.5-braam/fs/exec.c    2003-06-20 06:22:37.000000000 -0600
-@@ -1358,7 +1358,7 @@ int do_coredump(long signr, int exit_cod
+--- linux-2.6.0-test1/fs/exec.c~vfs_nointent_2.6.0-test1       2003-07-22 20:18:30.000000000 +0800
++++ linux-2.6.0-test1-root/fs/exec.c   2003-07-22 20:26:41.000000000 +0800
+@@ -1352,7 +1352,7 @@ int do_coredump(long signr, int exit_cod
                goto close_fail;
        if (!file->f_op->write)
                goto close_fail;