From owner-cvs-src@FreeBSD.ORG Tue Nov 11 18:54:48 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 8E47816A4CE; Tue, 11 Nov 2003 18:54:48 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 16C2143FBD; Tue, 11 Nov 2003 18:54:48 -0800 (PST) (envelope-from kan@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.9/8.12.9) with ESMTP id hAC2slXJ028244; Tue, 11 Nov 2003 18:54:47 -0800 (PST) (envelope-from kan@repoman.freebsd.org) Received: (from kan@localhost) by repoman.freebsd.org (8.12.9/8.12.9/Submit) id hAC2slF0028243; Tue, 11 Nov 2003 18:54:47 -0800 (PST) (envelope-from kan) Message-Id: <200311120254.hAC2slF0028243@repoman.freebsd.org> From: Alexander Kabaev Date: Tue, 11 Nov 2003 18:54:47 -0800 (PST) To: src-committers@FreeBSD.org, cvs-src@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/sys mount.h src/sys/nfsclient nfs_vfsops.c src/sys/kern vfs_mount.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Nov 2003 02:54:48 -0000 kan 2003/11/11 18:54:47 PST FreeBSD src repository Modified files: sys/sys mount.h sys/nfsclient nfs_vfsops.c sys/kern vfs_mount.c Log: 1. Consolidate mount struct allocation/destruction into a common code in vfs_mount_alloc/vfs_mount_destroy functions and take care to completely destroy the mount point along with its locks. Mount struct has grown in coplexity recently and depending on each failure path to destroy it completely isn't working anymore. 2. Eliminate largely identical vfs_mount and vfs_unmount question by moving the code to handle both cases into a newly introduced vfs_domount function. 3. Simplify nfs_mount_diskless to always expect an allocated mount struct and never attempt an allocation/destruction itself. The vfs_allocroot allocation was there to support 'magic' swap space configuration for diskless clients that was already removed by PHK some time ago. 4. Include a vfs_buildopts cleanups by Peter Edwards to validate the sanity of nmount parameters passed from userland. Submitted by: (4) Peter Edwards Reviewed by: rwatson Revision Changes Path 1.113 +171 -429 src/sys/kern/vfs_mount.c 1.143 +3 -23 src/sys/nfsclient/nfs_vfsops.c 1.150 +1 -0 src/sys/sys/mount.h