[PATCH] VFS: Permit filesystem to perform statfs with a known root dentry
[safe/jmp/linux-2.6] / fs / jfs / super.c
index 18f69e6..73d2aba 100644 (file)
@@ -139,9 +139,9 @@ static void jfs_destroy_inode(struct inode *inode)
        kmem_cache_free(jfs_inode_cachep, ji);
 }
 
-static int jfs_statfs(struct super_block *sb, struct kstatfs *buf)
+static int jfs_statfs(struct dentry *dentry, struct kstatfs *buf)
 {
-       struct jfs_sb_info *sbi = JFS_SBI(sb);
+       struct jfs_sb_info *sbi = JFS_SBI(dentry->d_sb);
        s64 maxinodes;
        struct inomap *imap = JFS_IP(sbi->ipimap)->i_imap;
 
@@ -565,10 +565,11 @@ static void jfs_unlockfs(struct super_block *sb)
        }
 }
 
-static struct super_block *jfs_get_sb(struct file_system_type *fs_type, 
-       int flags, const char *dev_name, void *data)
+static int jfs_get_sb(struct file_system_type *fs_type,
+       int flags, const char *dev_name, void *data, struct vfsmount *mnt)
 {
-       return get_sb_bdev(fs_type, flags, dev_name, data, jfs_fill_super);
+       return get_sb_bdev(fs_type, flags, dev_name, data, jfs_fill_super,
+                          mnt);
 }
 
 static int jfs_sync_fs(struct super_block *sb, int wait)
@@ -664,7 +665,8 @@ static int __init init_jfs_fs(void)
 
        jfs_inode_cachep =
            kmem_cache_create("jfs_ip", sizeof(struct jfs_inode_info), 0, 
-                           SLAB_RECLAIM_ACCOUNT, init_once, NULL);
+                           SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD,
+                           init_once, NULL);
        if (jfs_inode_cachep == NULL)
                return -ENOMEM;