Whamcloud - gitweb
Add link support to vanilla kernel patch.
authoradilger <adilger>
Thu, 19 Sep 2002 23:19:55 +0000 (23:19 +0000)
committeradilger <adilger>
Thu, 19 Sep 2002 23:19:55 +0000 (23:19 +0000)
lustre/patches/patch-2.4.18
lustre/patches/patch-2.4.18-12.5

index f30ecd6..23bc0c6 100644 (file)
  
        from = getname(oldname);
        if(IS_ERR(from))
-@@ -1648,10 +1755,12 @@
+@@ -1639,7 +1745,7 @@
+               error = 0;
+               if (path_init(from, LOOKUP_POSITIVE, &old_nd))
+-                      error = path_walk(from, &old_nd);
++                      error = path_walk_it(from, &old_nd, &it);
+               if (error)
+                       goto exit;
+               if (path_init(to, LOOKUP_PARENT, &nd))
+@@ -1648,10 +1755,13 @@
                error = -EXDEV;
                if (old_nd.mnt != nd.mnt)
                        goto out_release;
 -              new_dentry = lookup_create(&nd, 0);
++              it.it_op = IT_LINK2;
 +              new_dentry = lookup_create(&nd, 0, &it);
                error = PTR_ERR(new_dentry);
                if (!IS_ERR(new_dentry)) {
index db7304a..cf81ce7 100644 (file)
                if (old_nd.mnt != nd.mnt)
                        goto out_release;
 -              new_dentry = lookup_create(&nd, 0);
-+                it.it_op = IT_LINK2;
++              it.it_op = IT_LINK2;
 +              new_dentry = lookup_create(&nd, 0, &it);
                error = PTR_ERR(new_dentry);
                if (!IS_ERR(new_dentry)) {
 +      error = open_namei_it(filename, namei_flags, mode, &nd, &it);
 +      if (error)
 +              return ERR_PTR(error);
-+  
++
 +      return dentry_open_it(nd.dentry, nd.mnt, flags, &it);
  }
--
-+  
  extern ssize_t do_readahead(struct file *file, unsigned long index, unsigned long nr);
  /* for files over a certains size it doesn't pay to do readahead on open */
  #define READAHEAD_CUTOFF 48000