From 8dc26dde2a9c7c0b6f7506ccf9fce437ef79caf2 Mon Sep 17 00:00:00 2001 From: ccooper Date: Tue, 7 Sep 2004 22:36:26 +0000 Subject: [PATCH] b=4134 r=adilger,nic - landing Oleg's changes for releasing nameidata in ll_follow_link() on error --- lustre/kernel_patches/patches/vfs_intent-2.4.21-rhel.patch | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lustre/kernel_patches/patches/vfs_intent-2.4.21-rhel.patch b/lustre/kernel_patches/patches/vfs_intent-2.4.21-rhel.patch index b331767..85a8942 100644 --- a/lustre/kernel_patches/patches/vfs_intent-2.4.21-rhel.patch +++ b/lustre/kernel_patches/patches/vfs_intent-2.4.21-rhel.patch @@ -300,7 +300,7 @@ Index: linux-ia64/fs/namei.c break; } goto return_base; -@@ -643,6 +680,27 @@ return_reval: +@@ -643,6 +680,34 @@ return_reval: * Check the cached dentry for staleness. */ dentry = nd->dentry; @@ -324,6 +324,13 @@ Index: linux-ia64/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; -- 1.8.3.1