[PATCH] VFS: Permit filesystem to perform statfs with a known root dentry
[safe/jmp/linux-2.6] / fs / ext2 / super.c
index e153f0c..a6c4d6e 100644 (file)
@@ -39,7 +39,7 @@
 static void ext2_sync_super(struct super_block *sb,
                            struct ext2_super_block *es);
 static int ext2_remount (struct super_block * sb, int * flags, char * data);
-static int ext2_statfs (struct super_block * sb, struct kstatfs * buf);
+static int ext2_statfs (struct dentry * dentry, struct kstatfs * buf);
 
 void ext2_error (struct super_block * sb, const char * function,
                 const char * fmt, ...)
@@ -175,7 +175,8 @@ static int init_inodecache(void)
 {
        ext2_inode_cachep = kmem_cache_create("ext2_inode_cache",
                                             sizeof(struct ext2_inode_info),
-                                            0, SLAB_RECLAIM_ACCOUNT|SLAB_MEM_SPREAD,
+                                            0, (SLAB_RECLAIM_ACCOUNT|
+                                               SLAB_MEM_SPREAD),
                                             init_once, NULL);
        if (ext2_inode_cachep == NULL)
                return -ENOMEM;
@@ -210,8 +211,6 @@ static int ext2_show_options(struct seq_file *seq, struct vfsmount *vfs)
 
        if (sbi->s_mount_opt & EXT2_MOUNT_GRPID)
                seq_puts(seq, ",grpid");
-       else
-               seq_puts(seq, ",nogrpid");
 
 #if defined(CONFIG_QUOTA)
        if (sbi->s_mount_opt & EXT2_MOUNT_USRQUOTA)
@@ -1039,8 +1038,9 @@ restore_opts:
        return err;
 }
 
-static int ext2_statfs (struct super_block * sb, struct kstatfs * buf)
+static int ext2_statfs (struct dentry * dentry, struct kstatfs * buf)
 {
+       struct super_block *sb = dentry->d_sb;
        struct ext2_sb_info *sbi = EXT2_SB(sb);
        unsigned long overhead;
        int i;
@@ -1088,10 +1088,10 @@ static int ext2_statfs (struct super_block * sb, struct kstatfs * buf)
        return 0;
 }
 
-static struct super_block *ext2_get_sb(struct file_system_type *fs_type,
-       int flags, const char *dev_name, void *data)
+static int ext2_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, ext2_fill_super);
+       return get_sb_bdev(fs_type, flags, dev_name, data, ext2_fill_super, mnt);
 }
 
 #ifdef CONFIG_QUOTA