vfs_mount.c (162407) | vfs_mount.c (162444) |
---|---|
1/*- 2 * Copyright (c) 1999-2004 Poul-Henning Kamp 3 * Copyright (c) 1999 Michael Smith 4 * Copyright (c) 1989, 1993 5 * The Regents of the University of California. All rights reserved. 6 * (c) UNIX System Laboratories, Inc. 7 * All or some portions of this file are derived from material licensed 8 * to the University of California by American Telephone and Telegraph --- 21 unchanged lines hidden (view full) --- 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 */ 36 37#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1999-2004 Poul-Henning Kamp 3 * Copyright (c) 1999 Michael Smith 4 * Copyright (c) 1989, 1993 5 * The Regents of the University of California. All rights reserved. 6 * (c) UNIX System Laboratories, Inc. 7 * All or some portions of this file are derived from material licensed 8 * to the University of California by American Telephone and Telegraph --- 21 unchanged lines hidden (view full) --- 30 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 31 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 32 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 33 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 34 * SUCH DAMAGE. 35 */ 36 37#include <sys/cdefs.h> |
38__FBSDID("$FreeBSD: head/sys/kern/vfs_mount.c 162407 2006-09-18 15:35:22Z kib $"); | 38__FBSDID("$FreeBSD: head/sys/kern/vfs_mount.c 162444 2006-09-19 14:04:12Z kib $"); |
39 40#include <sys/param.h> 41#include <sys/conf.h> 42#include <sys/jail.h> 43#include <sys/kernel.h> 44#include <sys/libkern.h> 45#include <sys/mac.h> 46#include <sys/malloc.h> --- 1099 unchanged lines hidden (view full) --- 1146 } 1147 } 1148 /* 1149 * Only privileged root, or (if MNT_USER is set) the user that did the 1150 * original mount is permitted to unmount this filesystem. 1151 */ 1152 error = vfs_suser(mp, td); 1153 if (error) { | 39 40#include <sys/param.h> 41#include <sys/conf.h> 42#include <sys/jail.h> 43#include <sys/kernel.h> 44#include <sys/libkern.h> 45#include <sys/mac.h> 46#include <sys/malloc.h> --- 1099 unchanged lines hidden (view full) --- 1146 } 1147 } 1148 /* 1149 * Only privileged root, or (if MNT_USER is set) the user that did the 1150 * original mount is permitted to unmount this filesystem. 1151 */ 1152 error = vfs_suser(mp, td); 1153 if (error) { |
1154 VOP_UNLOCK(coveredvp, 0, td); | 1154 if (coveredvp) 1155 VOP_UNLOCK(coveredvp, 0, td); |
1155 return (error); 1156 } 1157 1158 MNT_ILOCK(mp); 1159 if (mp->mnt_kern_flag & MNTK_UNMOUNT) { 1160 MNT_IUNLOCK(mp); 1161 if (coveredvp) 1162 VOP_UNLOCK(coveredvp, 0, td); --- 974 unchanged lines hidden --- | 1156 return (error); 1157 } 1158 1159 MNT_ILOCK(mp); 1160 if (mp->mnt_kern_flag & MNTK_UNMOUNT) { 1161 MNT_IUNLOCK(mp); 1162 if (coveredvp) 1163 VOP_UNLOCK(coveredvp, 0, td); --- 974 unchanged lines hidden --- |