]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/hpfs/super.c
[PATCH] Really ignore kmem_cache_destroy return value
[mirror_ubuntu-bionic-kernel.git] / fs / hpfs / super.c
index d72d8c87c9962a5fa64afd25c86e0e605fd8ba12..450b5e0b4785c59431b002e5aa1db2b33aed70b8 100644 (file)
@@ -11,6 +11,7 @@
 #include <linux/parser.h>
 #include <linux/init.h>
 #include <linux/statfs.h>
+#include <linux/magic.h>
 
 /* Mark the filesystem dirty, so that chkdsk checks it when os/2 booted */
 
@@ -135,8 +136,9 @@ static unsigned count_bitmaps(struct super_block *s)
        return count;
 }
 
-static int hpfs_statfs(struct super_block *s, struct kstatfs *buf)
+static int hpfs_statfs(struct dentry *dentry, struct kstatfs *buf)
 {
+       struct super_block *s = dentry->d_sb;
        struct hpfs_sb_info *sbi = hpfs_sb(s);
        lock_kernel();
 
@@ -201,8 +203,7 @@ static int init_inodecache(void)
 
 static void destroy_inodecache(void)
 {
-       if (kmem_cache_destroy(hpfs_inode_cachep))
-               printk(KERN_INFO "hpfs_inode_cache: not all structures were freed\n");
+       kmem_cache_destroy(hpfs_inode_cachep);
 }
 
 /*
@@ -460,11 +461,10 @@ static int hpfs_fill_super(struct super_block *s, void *options, int silent)
 
        int o;
 
-       sbi = kmalloc(sizeof(*sbi), GFP_KERNEL);
+       sbi = kzalloc(sizeof(*sbi), GFP_KERNEL);
        if (!sbi)
                return -ENOMEM;
        s->s_fs_info = sbi;
-       memset(sbi, 0, sizeof(*sbi));
 
        sbi->sb_bmp_dir = NULL;
        sbi->sb_cp_table = NULL;
@@ -662,10 +662,11 @@ bail0:
        return -EINVAL;
 }
 
-static struct super_block *hpfs_get_sb(struct file_system_type *fs_type,
-       int flags, const char *dev_name, void *data)
+static int hpfs_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, hpfs_fill_super);
+       return get_sb_bdev(fs_type, flags, dev_name, data, hpfs_fill_super,
+                          mnt);
 }
 
 static struct file_system_type hpfs_fs_type = {