aboutsummaryrefslogtreecommitdiff
path: root/sys/gnu
diff options
context:
space:
mode:
authorGiorgos Keramidas <keramida@FreeBSD.org>2006-05-05 18:41:56 +0000
committerGiorgos Keramidas <keramida@FreeBSD.org>2006-05-05 18:41:56 +0000
commitac7050c114337ac7b005e4ff98910629636d8f6c (patch)
tree3495f860a38b2a9baa7ef11dfbc7a47042fa8aac /sys/gnu
parent671d06fb2e12f00dc4d3b97f908723884d695173 (diff)
downloadsrc-ac7050c114337ac7b005e4ff98910629636d8f6c.tar.gz
src-ac7050c114337ac7b005e4ff98910629636d8f6c.zip
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
Notes
Notes: svn path=/head/; revision=158317
Diffstat (limited to 'sys/gnu')
-rw-r--r--sys/gnu/fs/xfs/FreeBSD/xfs_mountops.c3
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 008a852a1bf0..21290594e6e9 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;