Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / kernel_patches / patches / vfs_intent-2.4.21-suse2.patch
index 85f8cf4..d283bd1 100644 (file)
@@ -300,7 +300,15 @@ Index: linux-2.4.21-x86_64/fs/namei.c
                                break;
                }
                goto return_base;
-@@ -643,6 +680,27 @@
+@@ -637,12 +672,42 @@
+                       nd->last_type = LAST_DOT;
+               else if (this.len == 2 && this.name[1] == '.')
+                       nd->last_type = LAST_DOTDOT;
++              else
++                      goto return_base;
+ return_reval:
+               /*
+                * We bypassed the ordinary revalidation routines.
                 * Check the cached dentry for staleness.
                 */
                dentry = nd->dentry;
@@ -324,6 +332,13 @@ Index: linux-2.4.21-x86_64/fs/namei.c
 +                      }
 +                      if (!nd->dentry->d_inode)
 +                              goto no_inode;
++                      if (lookup_flags & LOOKUP_DIRECTORY) {
++                              err = -ENOTDIR; 
++                              if (!nd->dentry->d_inode->i_op ||
++                                  (!nd->dentry->d_inode->i_op->lookup &&
++                                   !nd->dentry->d_inode->i_op->lookup_it))
++                                      break;
++                      }
 +              } else
                if (dentry && dentry->d_op && dentry->d_op->d_revalidate) {
                        err = -ESTALE;
@@ -332,8 +347,8 @@ Index: linux-2.4.21-x86_64/fs/namei.c
                dput(dentry);
                break;
        }
-+      if (err)
-+              intent_release(it);
++      if (err)
++              intent_release(it);
        path_release(nd);
  return_err:
        return err;
@@ -938,7 +953,7 @@ Index: linux-2.4.21-x86_64/fs/namespace.c
        int retval = 0;
        int mnt_flags = 0;
  
-@@ -725,9 +732,11 @@
+@@ -725,10 +732,11 @@
        flags &= ~(MS_NOSUID|MS_NOEXEC|MS_NODEV);
  
        /* ... and get the mountpoint */
@@ -948,10 +963,11 @@ Index: linux-2.4.21-x86_64/fs/namespace.c
 +      if (retval) {
 +              intent_release(&it);
                return retval;
+-
 +      }
        if (flags & MS_REMOUNT)
                retval = do_remount(&nd, flags & ~MS_REMOUNT, mnt_flags,
+                                   data_page);
 @@ -739,6 +747,8 @@
        else
                retval = do_add_mount(&nd, type_page, flags, mnt_flags,