From 09f7487326e23dfed472bfbf752b5ee58c225855 Mon Sep 17 00:00:00 2001 From: Oleg Droking Date: Fri, 18 Dec 2009 23:13:15 +0100 Subject: [PATCH] b=20989 fix race in nfs export code No need to look up the inode first anyway since ll_prep_inode is perfectly capable of finding correct inode if needed i=bzzz i=johann --- lustre/ChangeLog | 9 +++++++++ lustre/llite/llite_nfs.c | 17 +---------------- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/lustre/ChangeLog b/lustre/ChangeLog index 75bc600..dba89c6 100644 --- a/lustre/ChangeLog +++ b/lustre/ChangeLog @@ -266,6 +266,15 @@ Bugzilla : 17682 Description: Performance improvements for debug messages with D_RPCTRACE, D_LDLM, D_QUOTA options. +Severity : normal +Frequency : only with NFS export +Bugzilla : 20989 +Description: (lov_merge.c:74:lov_merge_lvb()) + ASSERTION(spin_is_locked(&lsm->lsm_lock)) failed (SR 71691004) +Details : Fix a race in the nfs export code by populating inode + info while the new inode is still locked + + ------------------------------------------------------------------------------- 2009-10-16 Sun Microsystems, Inc. * version 1.8.1.1 diff --git a/lustre/llite/llite_nfs.c b/lustre/llite/llite_nfs.c index 48a1f280..ae0bc03 100644 --- a/lustre/llite/llite_nfs.c +++ b/lustre/llite/llite_nfs.c @@ -59,16 +59,6 @@ __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) { @@ -79,18 +69,13 @@ 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 is ignore f_type */ + /* mds_fid2dentry ignores 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