From 682733fa5af37c1319a55a6405e1331a2802ccef Mon Sep 17 00:00:00 2001 From: Johann Lombardi Date: Wed, 17 Feb 2010 12:49:30 +0100 Subject: [PATCH] Revert "b=20989 fix race in nfs export code" This reverts commit 09f7487326e23dfed472bfbf752b5ee58c225855. Conflicts: lustre/ChangeLog --- lustre/llite/llite_nfs.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/lustre/llite/llite_nfs.c b/lustre/llite/llite_nfs.c index ae0bc03..48a1f280 100644 --- a/lustre/llite/llite_nfs.c +++ b/lustre/llite/llite_nfs.c @@ -59,6 +59,16 @@ __u32 get_uuid2int(const char *name, int len) #if THREAD_SIZE >= 8192 /* see bug 17630 */ +static int ll_nfs_test_inode(struct inode *inode, void *opaque) +{ + struct ll_fid *iid = opaque; + + if (inode->i_ino == iid->id && inode->i_generation == iid->generation) + return 1; + + return 0; +} + static struct inode * search_inode_for_lustre(struct super_block *sb, struct ll_fid *iid) { @@ -69,13 +79,18 @@ static struct inode * search_inode_for_lustre(struct super_block *sb, struct inode *inode = NULL; ENTRY; + inode = ILOOKUP(sb, iid->id, ll_nfs_test_inode, iid); + + if (inode) + RETURN(inode); + rc = ll_get_max_mdsize(sbi, &eadatalen); if (rc) RETURN(ERR_PTR(rc)); valid |= OBD_MD_FLEASIZE; - /* mds_fid2dentry ignores f_type */ + /* mds_fid2dentry is ignore f_type */ rc = mdc_getattr(sbi->ll_mdc_exp, iid, valid, eadatalen, &req); if (rc) { CERROR("failure %d inode "LPU64"\n", rc, iid->id); -- 1.8.3.1