From b4d45f15c3b0e465c8adce28f2d5dc61a5701e7d Mon Sep 17 00:00:00 2001 From: vs Date: Wed, 29 Jul 2009 11:47:07 +0000 Subject: [PATCH] b=17807 i=h.huang,nikita.danilov do not return 0 from ll_revalidate_nd in case of error: invalidated dentry may get recreated and real_lookup will revalidate agai instead of lookup. That revalidate oopses derefencing error code in the line: nd->intent.open.file->private_data = it; because nd->intent.open.file holds error from first revalidate. --- lustre/llite/dcache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/llite/dcache.c b/lustre/llite/dcache.c index 06eac36..0750445 100644 --- a/lustre/llite/dcache.c +++ b/lustre/llite/dcache.c @@ -734,7 +734,7 @@ int ll_revalidate_nd(struct dentry *dentry, struct nameidata *nd) nd->intent.open.file->private_data = it; filp = lookup_instantiate_filp(nd, dentry,NULL); if (IS_ERR(filp)) { - rc = 0; + rc = PTR_ERR(filp); } #else nd->intent.open.file->private_data = it; -- 1.8.3.1