add patch avoid-panic-during-forced-reboot-due-to-aborted-journal
[ext4-patch-queue.git] / fix-sparse-warnings
blob7f24c0c9cbc87ad07506f799de10f5005c85f2ad
1 ext4: fix miscellaneous sparse warnings
3 Signed-off-by: Theodore Ts'o <tytso@mit.edu>
4 ---
5  fs/ext4/fsmap.c | 2 +-
6  fs/ext4/ioctl.c | 2 +-
7  fs/ext4/super.c | 2 +-
8  3 files changed, 3 insertions(+), 3 deletions(-)
10 diff --git a/fs/ext4/fsmap.c b/fs/ext4/fsmap.c
11 index 4b99e2db95b8..dbccf46f1770 100644
12 --- a/fs/ext4/fsmap.c
13 +++ b/fs/ext4/fsmap.c
14 @@ -626,7 +626,7 @@ int ext4_getfsmap(struct super_block *sb, struct ext4_fsmap_head *head,
15  {
16         struct ext4_fsmap dkeys[2];     /* per-dev keys */
17         struct ext4_getfsmap_dev handlers[EXT4_GETFSMAP_DEVS];
18 -       struct ext4_getfsmap_info info = {0};
19 +       struct ext4_getfsmap_info info = { NULL };
20         int i;
21         int error = 0;
23 diff --git a/fs/ext4/ioctl.c b/fs/ext4/ioctl.c
24 index 7e85ecf0b849..e486e49b31ed 100644
25 --- a/fs/ext4/ioctl.c
26 +++ b/fs/ext4/ioctl.c
27 @@ -608,7 +608,7 @@ static int ext4_getfsmap_format(struct ext4_fsmap *xfm, void *priv)
28  static int ext4_ioc_getfsmap(struct super_block *sb,
29                              struct fsmap_head __user *arg)
30  {
31 -       struct getfsmap_info info = {0};
32 +       struct getfsmap_info info = { NULL };
33         struct ext4_fsmap_head xhead = {0};
34         struct fsmap_head head;
35         bool aborted = false;
36 diff --git a/fs/ext4/super.c b/fs/ext4/super.c
37 index fc6fa2c93e77..5013d04b41fd 100644
38 --- a/fs/ext4/super.c
39 +++ b/fs/ext4/super.c
40 @@ -4679,7 +4679,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
42  #ifdef CONFIG_QUOTA
43         for (i = 0; i < EXT4_MAXQUOTAS; i++)
44 -               kfree(sbi->s_qf_names[i]);
45 +               kfree(get_qf_name(sb, sbi, i));
46  #endif
47         ext4_blkdev_remove(sbi);
48         brelse(bh);