summaryrefslogtreecommitdiff
path: root/sys/nfs
diff options
context:
space:
mode:
authorBret Lambert <blambert@cvs.openbsd.org>2009-06-04 18:55:50 +0000
committerBret Lambert <blambert@cvs.openbsd.org>2009-06-04 18:55:50 +0000
commitaa72098595c243f20aca39f74cb402060e7fc251 (patch)
tree7a285c2cab8c63c42513bc58c3d3abc6c51066db /sys/nfs
parentaef680e2831a6840f12deebf70955064e6cd3cc4 (diff)
the following:
error = foo(); if (!error) bar(); is an alien construct; replace with one from this planet ok thib@
Diffstat (limited to 'sys/nfs')
-rw-r--r--sys/nfs/nfs_serv.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/sys/nfs/nfs_serv.c b/sys/nfs/nfs_serv.c
index 82c5a55a52d..bec6633b3cc 100644
--- a/sys/nfs/nfs_serv.c
+++ b/sys/nfs/nfs_serv.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: nfs_serv.c,v 1.68 2009/06/04 18:44:27 blambert Exp $ */
+/* $OpenBSD: nfs_serv.c,v 1.69 2009/06/04 18:55:49 blambert Exp $ */
/* $NetBSD: nfs_serv.c,v 1.34 1997/05/12 23:37:12 fvdl Exp $ */
/*
@@ -2168,16 +2168,19 @@ nfsrv_mkdir(nfsd, slp, procp, mrq)
error = EEXIST;
goto out;
}
+
error = VOP_MKDIR(nd.ni_dvp, &nd.ni_vp, &nd.ni_cnd, &va);
- if (!error) {
- vp = nd.ni_vp;
- bzero((caddr_t)fhp, sizeof(nfh));
- fhp->fh_fsid = vp->v_mount->mnt_stat.f_fsid;
- error = VFS_VPTOFH(vp, &fhp->fh_fid);
- if (!error)
- error = VOP_GETATTR(vp, &va, cred, procp);
- vput(vp);
- }
+ if (error)
+ goto out;
+
+ vp = nd.ni_vp;
+ bzero((caddr_t)fhp, sizeof(nfh));
+ fhp->fh_fsid = vp->v_mount->mnt_stat.f_fsid;
+ error = VFS_VPTOFH(vp, &fhp->fh_fid);
+ if (!error)
+ error = VOP_GETATTR(vp, &va, cred, procp);
+ vput(vp);
+
out:
if (dirp) {
diraft_ret = VOP_GETATTR(dirp, &diraft, cred, procp);