Check for VFS_STATFS() failure in _xfs_mount() and abort the mount

on errors.

Found by:	Coverity Prevent
Approved by:	rodrigc, Russell Cattelan
MFC after:	4 weeks
This commit is contained in:
Giorgos Keramidas 2006-05-05 18:41:56 +00:00
parent 671d06fb2e
commit ac7050c114
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=158317

View File

@ -202,8 +202,7 @@ _xfs_mount(struct mount *mp,
mp->mnt_stat.f_fsid.val[0] = dev2udev(ddev);
mp->mnt_stat.f_fsid.val[1] = mp->mnt_vfc->vfc_typenum;
VFS_STATFS(mp, &mp->mnt_stat, td);
if (error)
if ((error = VFS_STATFS(mp, &mp->mnt_stat, td)) != 0)
goto fail_unmount;
rvp = rootvp->v_vnode;