diff options
author | keramida <keramida@FreeBSD.org> | 2006-05-05 18:41:56 +0000 |
---|---|---|
committer | keramida <keramida@FreeBSD.org> | 2006-05-05 18:41:56 +0000 |
commit | c63aba945601ff11d4e089cef13d1557d563865e (patch) | |
tree | 3495f860a38b2a9baa7ef11dfbc7a47042fa8aac /sys/gnu/fs | |
parent | cbd19813ffdd55ccbd89357450cd9e6f42867064 (diff) | |
download | FreeBSD-src-c63aba945601ff11d4e089cef13d1557d563865e.zip FreeBSD-src-c63aba945601ff11d4e089cef13d1557d563865e.tar.gz |
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
Diffstat (limited to 'sys/gnu/fs')
-rw-r--r-- | sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c b/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c index 008a852..2129059 100644 --- a/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c +++ b/sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c @@ -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; |