Whamcloud - gitweb
b=20989 Don't search for inode in nfs get_dentry
authorOleg Drokin <green@linuxhacker.ru>
Tue, 2 Feb 2010 05:20:23 +0000 (00:20 -0500)
committerRobert Read <rread@sun.com>
Tue, 2 Feb 2010 06:27:41 +0000 (22:27 -0800)
Getting inode separately without some sort of locking enabled a situation where
several threads tried to populate same inode with different lsm data at the same
time leading to lsm pointer change (and leak).

i=johann
i=bzzz

lustre/llite/llite_nfs.c

index a2ce959..fb6c9c1 100644 (file)
@@ -60,12 +60,6 @@ __u32 get_uuid2int(const char *name, int len)
         return (key0 << 1);
 }
 
         return (key0 << 1);
 }
 
-static int ll_nfs_test_inode(struct inode *inode, void *opaque)
-{
-        return lu_fid_eq(&ll_i2info(inode)->lli_fid,
-                         (struct lu_fid *)opaque);
-}
-
 static struct inode *search_inode_for_lustre(struct super_block *sb,
                                              const struct lu_fid *fid)
 {
 static struct inode *search_inode_for_lustre(struct super_block *sb,
                                              const struct lu_fid *fid)
 {
@@ -80,10 +74,6 @@ static struct inode *search_inode_for_lustre(struct super_block *sb,
 
         CDEBUG(D_INFO, "searching inode for:(%lu,"DFID")\n", ino, PFID(fid));
 
 
         CDEBUG(D_INFO, "searching inode for:(%lu,"DFID")\n", ino, PFID(fid));
 
-        inode = ILOOKUP(sb, ino, ll_nfs_test_inode, fid);
-        if (inode)
-                RETURN(inode);
-
         rc = ll_get_max_mdsize(sbi, &eadatalen);
         if (rc)
                 RETURN(ERR_PTR(rc));
         rc = ll_get_max_mdsize(sbi, &eadatalen);
         if (rc)
                 RETURN(ERR_PTR(rc));