linux-disable-readahad-20081108
[openafs.git] / src / afs / LINUX / osi_vfsops.c
index 59fd43c..5cf5d55 100644 (file)
@@ -39,7 +39,7 @@ struct vfsmount *afs_cacheMnt;
 int afs_was_mounted = 0;       /* Used to force reload if mount/unmount/mount */
 
 extern struct super_operations afs_sops;
-#if defined(AFS_LINUX26_ENV)
+#if defined(AFS_LINUX26_ENV) && !defined(AFS_NONFSTRANS)
 extern struct export_operations afs_export_ops;
 #endif
 extern afs_rwlock_t afs_xvcache;
@@ -146,7 +146,10 @@ afs_read_super(struct super_block *sb, void *data, int silent)
     sb->s_blocksize_bits = 10;
     sb->s_magic = AFS_VFSMAGIC;
     sb->s_op = &afs_sops;      /* Super block (vfs) ops */
-#if defined(AFS_LINUX26_ENV)
+#if defined(HAVE_BDI_INIT)
+    bdi_init(&afs_backing_dev_info);
+#endif
+#if defined(AFS_LINUX26_ENV) && !defined(AFS_NONFSTRANS)
     sb->s_export_op = &afs_export_ops;
 #endif
 #if defined(MAX_NON_LFS)
@@ -301,8 +304,12 @@ static void
 #if defined(HAVE_KMEM_CACHE_T)
 init_once(void * foo, kmem_cache_t * cachep, unsigned long flags)
 #else
+#if defined(KMEM_CACHE_INIT)
+init_once(struct kmem_cache * cachep, void * foo)
+#else
 init_once(void * foo, struct kmem_cache * cachep, unsigned long flags)
 #endif
+#endif
 {
     struct vcache *vcp = (struct vcache *) foo;
 
@@ -396,6 +403,9 @@ afs_put_super(struct super_block *sbp)
 #endif
 
     osi_linux_verify_alloced_memory();
+#if defined(HAVE_BDI_INIT)
+    bdi_destroy(&afs_backing_dev_info);
+#endif
     AFS_GUNLOCK();
 
     sbp->s_dev = 0;