From: vs Date: Wed, 29 Jul 2009 00:39:45 +0000 (+0000) Subject: b=17807 X-Git-Tag: v1_8_2_01~1^2~206 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=dcd9567ab8c5ecc612f99e83123ab22fb79338a1;p=fs%2Flustre-release.git 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. --- 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;