X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fllite%2Fdcache.c;h=0f7c7e6346fb92725a2ec875a2467c63493c9899;hp=d4e4705802a1d28880badb71f0eeb183bee67961;hb=8faf82a6b002ecab7eaf4c6a0ccfaa72ecdd0154;hpb=a690d548b7b5e581470776335c33d322420722fa diff --git a/lustre/llite/dcache.c b/lustre/llite/dcache.c index d4e4705..0f7c7e6 100644 --- a/lustre/llite/dcache.c +++ b/lustre/llite/dcache.c @@ -761,16 +761,20 @@ int ll_revalidate_nd(struct dentry *dentry, struct nameidata *nd) (struct ptlrpc_request *) it->d.lustre.it_data); } else { - struct file *filp; - - nd->intent.open.file->private_data = it; - filp = lookup_instantiate_filp(nd, dentry,NULL); #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,17)) /* 2.6.1[456] have a bug in open_namei() that forgets to check * nd->intent.open.file for error, so we need to return it as lookup's result * instead */ - if (IS_ERR(filp)) - rc = 0; + struct file *filp; + + nd->intent.open.file->private_data = it; + filp = lookup_instantiate_filp(nd, dentry,NULL); + if (IS_ERR(filp)) { + rc = PTR_ERR(filp); + } +#else + nd->intent.open.file->private_data = it; + (void)lookup_instantiate_filp(nd, dentry,NULL); #endif } #else