Whamcloud - gitweb
b=4134
authorgreen <green>
Wed, 15 Sep 2004 22:56:41 +0000 (22:56 +0000)
committergreen <green>
Wed, 15 Sep 2004 22:56:41 +0000 (22:56 +0000)
r=nic
fix for cd .. into non-directory

lustre/kernel_patches/patches/vfs_intent-2.6-suse.patch

index ef327e7..f8781be 100644 (file)
@@ -136,7 +136,7 @@ Index: linux-2.6.5-12.1/fs/namei.c
                        dput(next.dentry);
                        mntput(next.mnt);
                        if (err)
-@@ -703,14 +749,26 @@
+@@ -703,14 +749,34 @@
                                inode = nd->dentry->d_inode;
                                /* fallthrough */
                        case 1:
@@ -149,6 +149,14 @@ Index: linux-2.6.5-12.1/fs/namei.c
 +                                      path_release(nd);
 +                                      goto return_err;
 +                              }
++                              if (lookup_flags & LOOKUP_DIRECTORY) {
++                                      err = -ENOTDIR;
++                                      if(!nd->dentry->d_inode->i_op ||
++                                        !nd->dentry->d_inode->i_op->lookup) {
++                                              path_release(nd);
++                                              goto return_err;
++                                      }
++                              }
                                goto return_reval;
                }
 +