From dcd9567ab8c5ecc612f99e83123ab22fb79338a1 Mon Sep 17 00:00:00 2001 From: vs Date: Wed, 29 Jul 2009 00:39:45 +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 7602d80..9b2fe52 100644 --- a/lustre/llite/dcache.c +++ b/lustre/llite/dcache.c @@ -719,7 +719,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