From owner-svn-src-stable-8@FreeBSD.ORG Sun Jan 16 14:37:48 2011 Return-Path: Delivered-To: svn-src-stable-8@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AF30F1065675; Sun, 16 Jan 2011 14:37:48 +0000 (UTC) (envelope-from rmacklem@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9D38A8FC16; Sun, 16 Jan 2011 14:37:48 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id p0GEbmDw066811; Sun, 16 Jan 2011 14:37:48 GMT (envelope-from rmacklem@svn.freebsd.org) Received: (from rmacklem@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id p0GEbmBt066807; Sun, 16 Jan 2011 14:37:48 GMT (envelope-from rmacklem@svn.freebsd.org) Message-Id: <201101161437.p0GEbmBt066807@svn.freebsd.org> From: Rick Macklem Date: Sun, 16 Jan 2011 14:37:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r217476 - stable/8/sys/fs/nfsserver X-BeenThere: svn-src-stable-8@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 8-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Jan 2011 14:37:48 -0000 Author: rmacklem Date: Sun Jan 16 14:37:48 2011 New Revision: 217476 URL: http://svn.freebsd.org/changeset/base/217476 Log: MFC: r216894 Delete some cruft from the experimental NFS server that was only used by the OpenBSD port for its pseudo-fs. Modified: stable/8/sys/fs/nfsserver/nfs_nfsdport.c stable/8/sys/fs/nfsserver/nfs_nfsdserv.c stable/8/sys/fs/nfsserver/nfs_nfsdsocket.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/amd64/include/xen/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) stable/8/sys/contrib/dev/acpica/ (props changed) stable/8/sys/contrib/pf/ (props changed) Modified: stable/8/sys/fs/nfsserver/nfs_nfsdport.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdport.c Sun Jan 16 14:21:26 2011 (r217475) +++ stable/8/sys/fs/nfsserver/nfs_nfsdport.c Sun Jan 16 14:37:48 2011 (r217476) @@ -47,7 +47,6 @@ __FBSDID("$FreeBSD$"); #include extern u_int32_t newnfs_true, newnfs_false, newnfs_xdrneg1; -extern int nfsv4root_set; extern int nfsrv_useacl; extern int newnfs_numnfsd; extern struct mount nfsv4root_mnt; @@ -2677,10 +2676,9 @@ nfsrv_v4rootexport(void *argp, struct uc fhandle_t fh; error = vfs_export(&nfsv4root_mnt, &nfsexargp->export); - if ((nfsexargp->export.ex_flags & MNT_DELEXPORT)) { + if ((nfsexargp->export.ex_flags & MNT_DELEXPORT) != 0) nfs_rootfhset = 0; - nfsv4root_set = 0; - } else if (error == 0) { + else if (error == 0) { if (nfsexargp->fspec == NULL) return (EPERM); /* Modified: stable/8/sys/fs/nfsserver/nfs_nfsdserv.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdserv.c Sun Jan 16 14:21:26 2011 (r217475) +++ stable/8/sys/fs/nfsserver/nfs_nfsdserv.c Sun Jan 16 14:37:48 2011 (r217476) @@ -51,7 +51,7 @@ __FBSDID("$FreeBSD$"); extern u_int32_t newnfs_false, newnfs_true; extern enum vtype nv34tov_type[8]; extern struct timeval nfsboottime; -extern int nfs_rootfhset, nfsv4root_set; +extern int nfs_rootfhset; #endif /* !APPLEKEXT */ /* @@ -2874,8 +2874,7 @@ nfsrvd_delegpurge(struct nfsrv_descript int error = 0; nfsquad_t clientid; - if ((!nfs_rootfhset && !nfsv4root_set) || - nfsd_checkrootexp(nd)) { + if (nfs_rootfhset == 0 || nfsd_checkrootexp(nd) != 0) { nd->nd_repstat = NFSERR_WRONGSEC; return (0); } @@ -3073,8 +3072,7 @@ nfsrvd_renew(struct nfsrv_descript *nd, int error = 0; nfsquad_t clientid; - if ((!nfs_rootfhset && !nfsv4root_set) || - nfsd_checkrootexp(nd)) { + if (nfs_rootfhset == 0 || nfsd_checkrootexp(nd) != 0) { nd->nd_repstat = NFSERR_WRONGSEC; return (0); } @@ -3212,8 +3210,7 @@ nfsrvd_setclientid(struct nfsrv_descript u_char *verf, *ucp, *ucp2, addrbuf[24]; nfsquad_t clientid, confirm; - if ((!nfs_rootfhset && !nfsv4root_set) || - nfsd_checkrootexp(nd)) { + if (nfs_rootfhset == 0 || nfsd_checkrootexp(nd) != 0) { nd->nd_repstat = NFSERR_WRONGSEC; return (0); } @@ -3321,8 +3318,7 @@ nfsrvd_setclientidcfrm(struct nfsrv_desc int error = 0; nfsquad_t clientid, confirm; - if ((!nfs_rootfhset && !nfsv4root_set) || - nfsd_checkrootexp(nd)) { + if (nfs_rootfhset == 0 || nfsd_checkrootexp(nd) != 0) { nd->nd_repstat = NFSERR_WRONGSEC; return (0); } @@ -3409,8 +3405,7 @@ nfsrvd_releaselckown(struct nfsrv_descri int error = 0, len; nfsquad_t clientid; - if ((!nfs_rootfhset && !nfsv4root_set) || - nfsd_checkrootexp(nd)) { + if (nfs_rootfhset == 0 || nfsd_checkrootexp(nd) != 0) { nd->nd_repstat = NFSERR_WRONGSEC; return (0); } Modified: stable/8/sys/fs/nfsserver/nfs_nfsdsocket.c ============================================================================== --- stable/8/sys/fs/nfsserver/nfs_nfsdsocket.c Sun Jan 16 14:21:26 2011 (r217475) +++ stable/8/sys/fs/nfsserver/nfs_nfsdsocket.c Sun Jan 16 14:37:48 2011 (r217476) @@ -50,8 +50,6 @@ extern struct nfsclienthashhead nfsclien extern int nfsrc_floodlevel, nfsrc_tcpsavedreplies; NFSV4ROOTLOCKMUTEX; NFSSTATESPINLOCK; -vnode_t nfsv4root_vp = NULL; -int nfsv4root_set = 0; int (*nfsrv3_procs0[NFS_V3NPROCS])(struct nfsrv_descript *, int, vnode_t , NFSPROC_T *, struct nfsexstuff *) = { @@ -748,20 +746,8 @@ nfsrvd_compound(struct nfsrv_descript *n NFSVOPUNLOCK(vp, 0, p); vpnes = nes; } - } else if (nfsv4root_vp && nfsv4root_set) { - if (vp) { - if (vpnes.nes_vfslocked) - nfsvno_unlockvfs(mp); - vrele(vp); - } - vp = nfsv4root_vp; - VREF(vp); - NFSVNO_SETEXRDONLY(&vpnes); - vpnes.nes_vfslocked = 0; - mp = vnode_mount(vp); - } else { + } else nd->nd_repstat = NFSERR_NOFILEHANDLE; - } break; case NFSV4OP_SAVEFH: if (vp && NFSVNO_EXPORTED(&vpnes)) { @@ -859,17 +845,6 @@ nfsrvd_compound(struct nfsrv_descript *n vfs_statfs(vnode_mount(nvp))->f_fsid.val[0] || vfs_statfs(mp)->f_fsid.val[1] != vfs_statfs(vnode_mount(nvp))->f_fsid.val[1]) { - if (vfs_statfs(vnode_mount(nvp))->f_fsid.val[0] == - NFSV4ROOT_FSID0 && - vfs_statfs(vnode_mount(nvp))->f_fsid.val[1] == - NFSV4ROOT_FSID1) { - if (vpnes.nes_vfslocked) { - nfsvno_unlockvfs(mp); - vpnes.nes_vfslocked = 0; - } - NFSVNO_SETEXRDONLY(&vpnes); - mp = vnode_mount(nvp); - } else { nd->nd_repstat = nfsvno_checkexp(vnode_mount(nvp), nd->nd_nam, &nes, &credanon); if (!nd->nd_repstat) @@ -885,7 +860,6 @@ nfsrvd_compound(struct nfsrv_descript *n vpnes.nes_vfslocked = nfsvno_lockvfs(mp); } - } } if (!nd->nd_repstat) { vrele(vp);