ext4: fix miscellaneous sparse warnings
authorTheodore Ts'o <tytso@mit.edu>
Sun, 12 May 2019 08:49:47 +0000 (04:49 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 12 May 2019 08:49:47 +0000 (04:49 -0400)
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/fsmap.c
fs/ext4/ioctl.c
fs/ext4/super.c

index 4b99e2db95b8bca58e99f8629ecfce17417e25d3..dbccf46f177091ebb981e2cf9cb4c2fde951f9b9 100644 (file)
@@ -626,7 +626,7 @@ int ext4_getfsmap(struct super_block *sb, struct ext4_fsmap_head *head,
 {
        struct ext4_fsmap dkeys[2];     /* per-dev keys */
        struct ext4_getfsmap_dev handlers[EXT4_GETFSMAP_DEVS];
-       struct ext4_getfsmap_info info = {0};
+       struct ext4_getfsmap_info info = { NULL };
        int i;
        int error = 0;
 
index 7e85ecf0b849f4a72d74f207da0de7a0138e8fda..e486e49b31ed7ac7e0db17f0e4205e51fb67538d 100644 (file)
@@ -608,7 +608,7 @@ static int ext4_getfsmap_format(struct ext4_fsmap *xfm, void *priv)
 static int ext4_ioc_getfsmap(struct super_block *sb,
                             struct fsmap_head __user *arg)
 {
-       struct getfsmap_info info = {0};
+       struct getfsmap_info info = { NULL };
        struct ext4_fsmap_head xhead = {0};
        struct fsmap_head head;
        bool aborted = false;
index fc6fa2c93e77c193939d095435a84fc188c53479..5013d04b41fd05f4be8878772690ea837c5285bc 100644 (file)
@@ -4679,7 +4679,7 @@ failed_mount:
 
 #ifdef CONFIG_QUOTA
        for (i = 0; i < EXT4_MAXQUOTAS; i++)
-               kfree(sbi->s_qf_names[i]);
+               kfree(get_qf_name(sb, sbi, i));
 #endif
        ext4_blkdev_remove(sbi);
        brelse(bh);