diff options
author | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2007-06-13 18:05:28 +0000 |
---|---|---|
committer | Thordur I. Bjornsson <thib@cvs.openbsd.org> | 2007-06-13 18:05:28 +0000 |
commit | 040a32fc98c8770282155cfca4eec63013d09816 (patch) | |
tree | e57dccaeb08e1e458c8f06d986c1765e5f500225 /sys/nfs | |
parent | a529d64e9da237e08114c22ff6a193bdcb4f2ed9 (diff) |
- Remove the nm_inprog member from struct nfsmount;
NQNFS leftover.
- Remove setting of the NFSMNT_DISMINPROG flag, its set
and unset in the same function servering no purpose,
im however going to reuse it shortly.
- kill an if thats always true (NFSMNT_KERB cant be set)
- misc cleanup and KNF.
ok beck@
Diffstat (limited to 'sys/nfs')
-rw-r--r-- | sys/nfs/nfs_vfsops.c | 46 | ||||
-rw-r--r-- | sys/nfs/nfsmount.h | 3 |
2 files changed, 10 insertions, 39 deletions
diff --git a/sys/nfs/nfs_vfsops.c b/sys/nfs/nfs_vfsops.c index 177fbaafa38..6a975bfd909 100644 --- a/sys/nfs/nfs_vfsops.c +++ b/sys/nfs/nfs_vfsops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nfs_vfsops.c,v 1.64 2007/06/12 19:25:27 thib Exp $ */ +/* $OpenBSD: nfs_vfsops.c,v 1.65 2007/06/13 18:05:27 thib Exp $ */ /* $NetBSD: nfs_vfsops.c,v 1.46.4.1 1996/05/25 22:40:35 fvdl Exp $ */ /* @@ -685,7 +685,6 @@ mountnfs(argp, mp, nam, pth, hst) nmp->nm_numgrps = NFS_MAXGRPS; nmp->nm_readahead = NFS_DEFRAHEAD; nmp->nm_deadthresh = NQ_DEADTHRESH; - nmp->nm_inprog = NULLVP; nmp->nm_fhsize = argp->fhsize; nmp->nm_acregmin = NFS_MINATTRTIMO; nmp->nm_acregmax = NFS_MAXATTRTIMO; @@ -727,53 +726,26 @@ bad: return (error); } -/* - * unmount system call - */ +/* unmount system call */ int -nfs_unmount(mp, mntflags, p) - struct mount *mp; - int mntflags; - struct proc *p; +nfs_unmount(struct mount *mp, int mntflags, struct proc *p) { struct nfsmount *nmp; - int error, flags = 0; + int error, flags; + + nmp = VFSTONFS(mp); + flags = 0; if (mntflags & MNT_FORCE) flags |= FORCECLOSE; - nmp = VFSTONFS(mp); - /* - * Goes something like this.. - * - Call vflush() to clear out vnodes for this file system, - * except for the root vnode. - * - Close the socket - * - Free up the data structures - */ - /* - * Must handshake with nqnfs_clientd() if it is active. - */ - nmp->nm_flag |= NFSMNT_DISMINPROG; - while (nmp->nm_inprog != NULLVP) - (void) tsleep((caddr_t)&lbolt, PSOCK, "nfsdism", 0); error = vflush(mp, NULL, flags); - if (error) { - nmp->nm_flag &= ~NFSMNT_DISMINPROG; + if (error) return (error); - } - - /* - * We are now committed to the unmount. - * For NQNFS, let the server daemon free the nfsmount structure. - */ - if (nmp->nm_flag & NFSMNT_KERB) - nmp->nm_flag |= NFSMNT_DISMNT; nfs_disconnect(nmp); m_freem(nmp->nm_nam); - - if ((nmp->nm_flag & NFSMNT_KERB) == 0) - free((caddr_t)nmp, M_NFSMNT); + free(nmp, M_NFSMNT); return (0); } diff --git a/sys/nfs/nfsmount.h b/sys/nfs/nfsmount.h index 216ebb0b33a..f220ddc6b49 100644 --- a/sys/nfs/nfsmount.h +++ b/sys/nfs/nfsmount.h @@ -1,4 +1,4 @@ -/* $OpenBSD: nfsmount.h,v 1.13 2007/04/12 13:24:39 thib Exp $ */ +/* $OpenBSD: nfsmount.h,v 1.14 2007/06/13 18:05:27 thib Exp $ */ /* $NetBSD: nfsmount.h,v 1.10 1996/02/18 11:54:03 fvdl Exp $ */ /* @@ -67,7 +67,6 @@ struct nfsmount { int nm_wsize; /* Max size of write rpc */ int nm_readdirsize; /* Size of a readdir rpc */ int nm_readahead; /* Num. of blocks to readahead */ - struct vnode *nm_inprog; /* Vnode in prog by nqnfs_clientd() */ uid_t nm_authuid; /* Uid for authenticator */ int nm_authtype; /* Authenticator type */ int nm_authlen; /* and length */ |