@@ -365,8 +365,7 @@ void v9fs_evict_inode(struct inode *inode)
365365 clear_inode (inode );
366366}
367367
368- struct inode *
369- v9fs_fid_iget (struct super_block * sb , struct p9_fid * fid , bool new )
368+ struct inode * v9fs_fid_iget (struct super_block * sb , struct p9_fid * fid )
370369{
371370 dev_t rdev ;
372371 int retval ;
@@ -378,18 +377,8 @@ v9fs_fid_iget(struct super_block *sb, struct p9_fid *fid, bool new)
378377 inode = iget_locked (sb , QID2INO (& fid -> qid ));
379378 if (unlikely (!inode ))
380379 return ERR_PTR (- ENOMEM );
381- if (!(inode -> i_state & I_NEW )) {
382- if (!new ) {
383- goto done ;
384- } else {
385- p9_debug (P9_DEBUG_VFS , "WARNING: Inode collision %ld\n" ,
386- inode -> i_ino );
387- iput (inode );
388- remove_inode_hash (inode );
389- inode = iget_locked (sb , QID2INO (& fid -> qid ));
390- WARN_ON (!(inode -> i_state & I_NEW ));
391- }
392- }
380+ if (!(inode -> i_state & I_NEW ))
381+ return inode ;
393382
394383 /*
395384 * initialize the inode with the stat info
@@ -413,11 +402,11 @@ v9fs_fid_iget(struct super_block *sb, struct p9_fid *fid, bool new)
413402 v9fs_set_netfs_context (inode );
414403 v9fs_cache_inode_get_cookie (inode );
415404 unlock_new_inode (inode );
416- done :
417405 return inode ;
418406error :
419407 iget_failed (inode );
420408 return ERR_PTR (retval );
409+
421410}
422411
423412/**
@@ -449,15 +438,8 @@ static int v9fs_at_to_dotl_flags(int flags)
449438 */
450439static void v9fs_dec_count (struct inode * inode )
451440{
452- if (!S_ISDIR (inode -> i_mode ) || inode -> i_nlink > 2 ) {
453- if (inode -> i_nlink ) {
454- drop_nlink (inode );
455- } else {
456- p9_debug (P9_DEBUG_VFS ,
457- "WARNING: unexpected i_nlink zero %d inode %ld\n" ,
458- inode -> i_nlink , inode -> i_ino );
459- }
460- }
441+ if (!S_ISDIR (inode -> i_mode ) || inode -> i_nlink > 2 )
442+ drop_nlink (inode );
461443}
462444
463445/**
@@ -508,9 +490,6 @@ static int v9fs_remove(struct inode *dir, struct dentry *dentry, int flags)
508490 } else
509491 v9fs_dec_count (inode );
510492
511- if (inode -> i_nlink <= 0 ) /* no more refs unhash it */
512- remove_inode_hash (inode );
513-
514493 v9fs_invalidate_inode_attr (inode );
515494 v9fs_invalidate_inode_attr (dir );
516495
@@ -576,7 +555,7 @@ v9fs_create(struct v9fs_session_info *v9ses, struct inode *dir,
576555 /*
577556 * instantiate inode and assign the unopened fid to the dentry
578557 */
579- inode = v9fs_get_inode_from_fid (v9ses , fid , dir -> i_sb , true );
558+ inode = v9fs_get_inode_from_fid (v9ses , fid , dir -> i_sb );
580559 if (IS_ERR (inode )) {
581560 err = PTR_ERR (inode );
582561 p9_debug (P9_DEBUG_VFS ,
@@ -705,7 +684,7 @@ struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry,
705684 else if (IS_ERR (fid ))
706685 inode = ERR_CAST (fid );
707686 else
708- inode = v9fs_get_inode_from_fid (v9ses , fid , dir -> i_sb , false );
687+ inode = v9fs_get_inode_from_fid (v9ses , fid , dir -> i_sb );
709688 /*
710689 * If we had a rename on the server and a parallel lookup
711690 * for the new name, then make sure we instantiate with
0 commit comments