[OpenAFS-devel] possible solution for iput issue... (also tra nsarc #60276)

Neulinger, Nathan nneul@umr.edu
Mon, 16 Apr 2001 13:37:19 -0500


Yeah, that looks a bit cleaner than the patch I sent.

-- Nathan

> -----Original Message-----
> From: Chas Williams [mailto:chas@cmf.nrl.navy.mil]
> Sent: Monday, April 16, 2001 1:29 PM
> To: Neulinger, Nathan
> Cc: 'openafs-devel@openafs.org'
> Subject: Re: [OpenAFS-devel] possible solution for iput issue... (also
> tra nsarc #60276) 
> 
> 
> In message 
> <F349BC4F5799D411ACE100D0B706B3BB34280F@umr-mail03.cc.umr.edu>,"Neul
> inger, Nathan" writes:
> >Actually no... every one that I've seen had avc == vcp. The 
> issue is that no
> >matter what happens, if it does the afs_lookup, i_count gets 
> incremented and
> >never decremented. 
> 
> i think i see what's going on here.  when the parent id is 
> possibly 'bad'
> (for whatever reason)  check_bad_parent does another lookup on the 
> entity.  this will create another reference to the inode 
> (avc).  and yes,
> no one releases this reference.  avc and vcp should be the same vnode,
> but that's only because afs uses a static inode cache, 
> otherwise you could
> think of avc as a new inode that never gets iput.  a likely 
> patch would be
> (i also took the liberty of adding a crfree which i think is missing):
> 
> 
> Index: osi_misc.c
> ===================================================================
> RCS file: /afs/cmf/project/cvsroot/openafs/src/afs/LINUX/osi_misc.c,v
> retrieving revision 1.8
> diff -u -r1.8 osi_misc.c
> --- osi_misc.c  2001/03/31 22:46:36     1.8
> +++ osi_misc.c  2001/04/16 18:15:03
> @@ -412,6 +413,9 @@
>                  ICL_TYPE_POINTER, avc,
>                  ICL_TYPE_POINTER, dp);
>      }
> +    if (avc)
> +       AFS_RELE(avc);
> +    crfree(credp);
>      
>    } /* if bad parent */
>   
>