aboutsummaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2020-12-10 15:23:26 -0800
committerGitHub <[email protected]>2020-12-10 15:23:26 -0800
commite5f732edbb0d3242708442e14e033935399cf1bb (patch)
tree6ebf6fcbbc39829bbff16ecaf9251757be80c044 /module
parent60a4c7d2a2f8e8123e3c2e45d1773b5849f74b16 (diff)
Fix possibly uninitialized 'root_inode' variable warning
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 <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #11306
Diffstat (limited to 'module')
-rw-r--r--module/os/linux/zfs/zfs_vfsops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/module/os/linux/zfs/zfs_vfsops.c b/module/os/linux/zfs/zfs_vfsops.c
index 6c0d8134c..ef5927d4f 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;