The following patch stop a spinlock recursion BUG() from popping by moving the call to nfs_invalidate_inode() out of nfs_update_inode(). The nfs_invalidate_inode() is now down only when nfs_update_inode() returns -ESTALE. Signed-off-by: Steve Dickson ---------------------------------------------- --- linux-2.6.14/fs/nfs/inode.c.orig 2005-11-16 12:04:36.464685000 -0500 +++ linux-2.6.14/fs/nfs/inode.c 2005-11-16 14:23:45.790210000 -0500 @@ -1129,6 +1129,8 @@ __nfs_revalidate_inode(struct nfs_server dfprintk(PAGECACHE, "nfs_revalidate_inode: (%s/%Ld) refresh failed, error=%d\n", inode->i_sb->s_id, (long long)NFS_FILEID(inode), status); + if (status == -ESTALE) + nfs_invalidate_inode(inode); goto out; } cache_validity = nfsi->cache_validity; @@ -1355,6 +1357,8 @@ int nfs_refresh_inode(struct inode *inod status = nfs_check_inode_attributes(inode, fattr); spin_unlock(&inode->i_lock); + if (status == -ESTALE) + nfs_invalidate_inode(inode); return status; } @@ -1382,6 +1386,8 @@ int nfs_post_op_update_inode(struct inod nfsi->cache_change_attribute = jiffies; out: spin_unlock(&inode->i_lock); + if (status == -ESTALE) + nfs_invalidate_inode(inode); return status; } @@ -1528,12 +1534,6 @@ static int nfs_update_inode(struct inode printk(KERN_DEBUG "%s: inode %ld mode changed, %07o to %07o\n", __FUNCTION__, inode->i_ino, inode->i_mode, fattr->mode); #endif - /* - * No need to worry about unhashing the dentry, as the - * lookup validation will know that the inode is bad. - * (But we fall through to invalidate the caches.) - */ - nfs_invalidate_inode(inode); out_err: set_bit(NFS_INO_STALE, &NFS_FLAGS(inode)); return -ESTALE;