From f217a2b9023ceb0e92905e1f3a77a3da238bc357 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Thu, 10 Dec 2020 15:23:26 -0800 Subject: [PATCH] Fix possibly uninitialized 'root_inode' variable warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolve an uninitialized variable warning when compiling. In function ‘zfs_domount’: warning: ‘root_inode’ may be used uninitialized in this function [-Wmaybe-uninitialized] sb->s_root = d_make_root(root_inode); Reviewed-by: Tony Hutter Signed-off-by: Brian Behlendorf Closes #11306 --- module/os/linux/zfs/zfs_vfsops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/os/linux/zfs/zfs_vfsops.c b/module/os/linux/zfs/zfs_vfsops.c index 6c0d8134c4..ef5927d4f1 100644 --- a/module/os/linux/zfs/zfs_vfsops.c +++ b/module/os/linux/zfs/zfs_vfsops.c @@ -1451,7 +1451,7 @@ int zfs_domount(struct super_block *sb, zfs_mnt_t *zm, int silent) { const char *osname = zm->mnt_osname; - struct inode *root_inode; + struct inode *root_inode = NULL; uint64_t recordsize; int error = 0; zfsvfs_t *zfsvfs = NULL;