From 841a8de64fe7f588888ff31db49c25ab02f72e96 Mon Sep 17 00:00:00 2001 From: Barry Naujok Date: Thu, 20 Nov 2008 14:22:02 +0000 Subject: [PATCH] Fix libxfs_iput on a non-existent root inode during libxfs init Merge of master-melb:xfs-cmds:32504a by kenmcd. Only do libxfs_iput on root inode if it's not NULL during libxfs init --- libxfs/init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/libxfs/init.c b/libxfs/init.c index 68eb288ed..75d043e53 100644 --- a/libxfs/init.c +++ b/libxfs/init.c @@ -670,7 +670,8 @@ libxfs_mount( ASSERT(mp->m_rootip != NULL); } if ((flags & LIBXFS_MOUNT_ROOTINOS) && rtmount_inodes(mp)) { - libxfs_iput(mp->m_rootip, 0); + if (mp->m_rootip) + libxfs_iput(mp->m_rootip, 0); return NULL; } -- 2.47.2