Whamcloud - gitweb
b=5985
authorgreen <green>
Fri, 1 Apr 2005 15:46:59 +0000 (15:46 +0000)
committergreen <green>
Fri, 1 Apr 2005 15:46:59 +0000 (15:46 +0000)
r=adilger
Do not drop LOOKUP_LINK_NOTLAST flag not set by us (in case of recursive
symlinks)

lustre/kernel_patches/patches/link_notlast-susefix.patch [new file with mode: 0644]
lustre/kernel_patches/patches/vfs_intent-2.6-rhel4.patch
lustre/kernel_patches/series/2.6-suse-lnxi.series

diff --git a/lustre/kernel_patches/patches/link_notlast-susefix.patch b/lustre/kernel_patches/patches/link_notlast-susefix.patch
new file mode 100644 (file)
index 0000000..e3efbb4
--- /dev/null
@@ -0,0 +1,16 @@
+--- linux-2.6.5-7.141/fs/namei.c.orig  2005-04-01 18:03:37.788262784 +0300
++++ linux-2.6.5-7.141/fs/namei.c       2005-04-01 18:05:43.058218856 +0300
+@@ -719,10 +719,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)
index 3057402..8ffead7 100644 (file)
@@ -1,7 +1,7 @@
 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;
@@ -47,8 +47,8 @@ Index: linux-2.6.9-5.0.3.EL/fs/exec.c
                                        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;
  }
@@ -146,17 +146,20 @@ Index: linux-2.6.9-5.0.3.EL/fs/namei.c
  /*
   * 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:
@@ -191,7 +194,7 @@ Index: linux-2.6.9-5.0.3.EL/fs/namei.c
                if (err)
                        break;
                follow_mount(&next.mnt, &next.dentry);
-@@ -1016,7 +1087,7 @@
+@@ -1016,7 +1089,7 @@
  }
  
  /* SMP-safe */
@@ -200,7 +203,7 @@ Index: linux-2.6.9-5.0.3.EL/fs/namei.c
  {
        unsigned long hash;
        struct qstr this;
-@@ -1036,11 +1107,16 @@
+@@ -1036,11 +1109,16 @@
        }
        this.hash = end_name_hash(hash);
  
@@ -218,7 +221,7 @@ Index: linux-2.6.9-5.0.3.EL/fs/namei.c
  /*
   *    namei()
   *
-@@ -1052,7 +1128,7 @@
+@@ -1052,7 +1130,7 @@
   * that namei follows links, while lnamei does not.
   * SMP-safe
   */
@@ -227,7 +230,7 @@ Index: linux-2.6.9-5.0.3.EL/fs/namei.c
  {
        char *tmp = getname(name);
        int err = PTR_ERR(tmp);
-@@ -1064,6 +1140,12 @@
+@@ -1064,6 +1142,12 @@
        return err;
  }
  
@@ -240,7 +243,7 @@ Index: linux-2.6.9-5.0.3.EL/fs/namei.c
  /*
   * 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 */
@@ -251,7 +254,7 @@ Index: linux-2.6.9-5.0.3.EL/fs/namei.c
  
        /*
         * The simplest case - just a plain lookup.
-@@ -1363,6 +1445,7 @@
+@@ -1363,6 +1447,7 @@
        /*
         * Create - we need to know the parent.
         */
@@ -259,7 +262,7 @@ Index: linux-2.6.9-5.0.3.EL/fs/namei.c
        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);
@@ -269,7 +272,7 @@ Index: linux-2.6.9-5.0.3.EL/fs/namei.c
  
  do_last:
        error = PTR_ERR(dentry);
-@@ -1492,7 +1577,9 @@
+@@ -1492,7 +1579,9 @@
        }
        dir = nd->dentry;
        down(&dir->d_inode->i_sem);
@@ -281,8 +284,8 @@ Index: linux-2.6.9-5.0.3.EL/fs/namei.c
  }
 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);
@@ -344,8 +347,8 @@ Index: linux-2.6.9-5.0.3.EL/fs/namespace.c
                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;
@@ -500,8 +503,8 @@ Index: linux-2.6.9-5.0.3.EL/fs/open.c
   */
 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);
@@ -573,8 +576,8 @@ Index: linux-2.6.9-5.0.3.EL/fs/stat.c
        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))
@@ -595,8 +598,8 @@ Index: linux-2.6.9-5.0.3.EL/fs/nfs/dir.c
         * 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--;
  }
@@ -607,8 +610,8 @@ Index: linux-2.6.9-5.0.3.EL/fs/inode.c
   * @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__
  
@@ -628,8 +631,8 @@ Index: linux-2.6.9-5.0.3.EL/include/linux/dcache.h
        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
@@ -699,8 +702,8 @@ Index: linux-2.6.9-5.0.3.EL/include/linux/fs.h
  
 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
  
@@ -753,7 +756,7 @@ Index: linux-2.6.9-5.0.3.EL/include/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];
  
@@ -765,7 +768,7 @@ Index: linux-2.6.9-5.0.3.EL/include/linux/namei.h
  };
  
  /*
-@@ -46,6 +78,8 @@
+@@ -46,6 +77,8 @@
  #define LOOKUP_PARENT         16
  #define LOOKUP_NOALT          32
  #define LOOKUP_ATOMIC         64
@@ -774,7 +777,7 @@ Index: linux-2.6.9-5.0.3.EL/include/linux/namei.h
  
  /*
   * 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 *));
@@ -787,7 +790,7 @@ Index: linux-2.6.9-5.0.3.EL/include/linux/namei.h
  #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 *);
@@ -797,8 +800,8 @@ Index: linux-2.6.9-5.0.3.EL/include/linux/namei.h
  
 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 */
@@ -810,8 +813,8 @@ Index: linux-2.6.9-5.0.3.EL/include/linux/mount.h
  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);
  }
index e60eebd..59c9be2 100644 (file)
@@ -8,3 +8,4 @@ kexec-2.6-suse-lnxi.patch
 export-filemap_populate.patch
 grab_cache_page_nowait_gfp-2.6-suse.patch 
 remove-suid-2.6-suse.patch
+link_notlast-susefix.patch