From aa66998a518137bfff4c5e461904acb8b6c567df Mon Sep 17 00:00:00 2001 From: green Date: Wed, 15 Sep 2004 22:56:41 +0000 Subject: [PATCH] b=4134 r=nic fix for cd .. into non-directory --- lustre/kernel_patches/patches/vfs_intent-2.6-suse.patch | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/lustre/kernel_patches/patches/vfs_intent-2.6-suse.patch b/lustre/kernel_patches/patches/vfs_intent-2.6-suse.patch index ef327e7..f8781be 100644 --- a/lustre/kernel_patches/patches/vfs_intent-2.6-suse.patch +++ b/lustre/kernel_patches/patches/vfs_intent-2.6-suse.patch @@ -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; } + -- 1.8.3.1