{
struct vcache *vcp;
+#if defined(SLAB_KERNEL)
vcp = (struct vcache *) kmem_cache_alloc(afs_inode_cachep, SLAB_KERNEL);
+#else
+ vcp = (struct vcache *) kmem_cache_alloc(afs_inode_cachep, GFP_KERNEL);
+#endif
if (!vcp)
return NULL;
void
afs_destroy_inodecache(void)
{
- (void) kmem_cache_destroy(afs_inode_cachep);
+ if (afs_inode_cachep)
+ (void) kmem_cache_destroy(afs_inode_cachep);
}
#else
int
AFS_STATCNT(afs_statfs);
- statp->f_type = 0; /* Can we get a real type sometime? */
+ /* hardcode in case that which is giveth is taken away */
+ statp->f_type = 0x5346414F;
#if defined(STATFS_TAKES_DENTRY)
statp->f_bsize = dentry->d_sb->s_blocksize;
#else
ip->i_ino = vp->va_nodeid;
ip->i_nlink = vp->va_nlink;
ip->i_blocks = vp->va_blocks;
+#ifdef STRUCT_INODE_HAS_I_BLKBITS
+ ip->i_blkbits = AFS_BLKBITS;
+#endif
#ifdef STRUCT_INODE_HAS_I_BLKSIZE
ip->i_blksize = vp->va_blocksize;
#endif