[OpenAFS-devel] afs_dentry_iput patch (linux)
Neulinger, Nathan R.
nneul@umr.edu
Wed, 24 Jan 2001 13:20:39 -0600
Ok. While I admit I like the fact that you are deleting code that generates
an error message on some of my clients (web and other servers) - I wonder if
that is a good approach or if it will just hide my problem. :)
Transarc said they had some ideas on what might be the problem, but has
never given me any followup to say they actually fixed it.
I see that refCount error occasionally on some of these clients, and it
pretty much toasts AFS. There is usually no explanation.
Unfortunately, I can't reproduce the error, it just happens spontaneously.
-- Nathan
> -----Original Message-----
> From: Chas Williams [mailto:chas@cmf.nrl.navy.mil]
> Sent: Wednesday, January 24, 2001 1:07 PM
> To: openafs-devel@openafs.org
> Subject: [OpenAFS-devel] afs_dentry_iput patch (linux)
>
>
> the code in afs_dentry_iput() looks very similar to osi_iput()
> expect for checking to see if the inode is an 'afs' inode.
> i suspect afs_dentry_iput() would never be called w/ a non-afs
> inode, anyway.
>
> so i suggest the following:
>
> Index: osi_vnodeops.c
> ===================================================================
> RCS file:
> /afs/cmf/project/cvsroot/openafs/src/afs/LINUX/osi_vnodeops.c,v
> retrieving revision 1.1.1.3
> retrieving revision 1.10
> diff -u -r1.1.1.3 -r1.10
> --- osi_vnodeops.c 2001/01/23 21:24:09 1.1.1.3
> +++ osi_vnodeops.c 2001/01/24 18:56:41 1.10
> @@ -709,27 +708,7 @@
> /* afs_dentry_iput */
> static void afs_dentry_iput(struct dentry *dp, struct inode *ip)
> {
> -#if defined(AFS_LINUX24_ENV)
> - if (atomic_read(&ip->i_count) == 0 ||
> atomic_read(&ip->i_count) & 0xffff0000) {
> -#else
> - if (ip->i_count == 0 || ip->i_count & 0xffff0000) {
> -#endif
> - osi_Panic("Bad refCount %d on inode 0x%x\n",
> -#if defined(AFS_LINUX24_ENV)
> - atomic_read(&ip->i_count), ip);
> -#else
> - ip->i_count, ip);
> -#endif
> - }
> -#if defined(AFS_LINUX24_ENV)
> - atomic_dec(&ip->i_count);
> - if (!atomic_read(&ip->i_count)) {
> -#else
> - ip->i_count --;
> - if (!ip->i_count) {
> -#endif
> - afs_delete_inode(ip);
> - }
> + osi_iput(ip);
> }
>
> #if defined(AFS_LINUX24_ENV)
> _______________________________________________
> OpenAFS-devel mailing list
> OpenAFS-devel@openafs.org
> https://lists.openafs.org/mailman/listinfo.cgi/openafs-devel
>