[OpenAFS] afsd segfaults

Ian D ian@assv.net
28 Feb 2002 23:19:23 +0100


Derek Atkins <derek@ihtfp.com> writes:

*inode.c-excerpt snipped*

> This looks fine for O-A 1.2.3.  This is from your mandrake
> kernel sources?

Yes, that's for the 2.4.13 machine. The one from 2.4.8 is different,
it seems:

static void init_once(void * foo, kmem_cache_t * cachep, unsigned long
flags)
{
        struct inode * inode = (struct inode *) foo;

        if ((flags & (SLAB_CTOR_VERIFY|SLAB_CTOR_CONSTRUCTOR)) ==
            SLAB_CTOR_CONSTRUCTOR)
        {
                memset(inode, 0, sizeof(*inode));
                init_waitqueue_head(&inode->i_wait);
                INIT_LIST_HEAD(&inode->i_hash);
                INIT_LIST_HEAD(&inode->i_data.clean_pages);
                INIT_LIST_HEAD(&inode->i_data.dirty_pages);
                INIT_LIST_HEAD(&inode->i_data.locked_pages);
                INIT_LIST_HEAD(&inode->i_dentry);
                INIT_LIST_HEAD(&inode->i_dirty_buffers);
                init_rwsem(&inode->i_truncate_sem);
                sema_init(&inode->i_sem, 1);
                sema_init(&inode->i_zombie, 1);
                spin_lock_init(&inode->i_data.i_shared_lock);
        }
}

-- 
/Ian D
ian@assv.net