Deleted Added
full compact
opensolaris_vfs.c (173247) opensolaris_vfs.c (175202)
1/*-
2 * Copyright (c) 2006-2007 Pawel Jakub Dawidek <pjd@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 2006-2007 Pawel Jakub Dawidek <pjd@FreeBSD.org>
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright

--- 11 unchanged lines hidden (view full) ---

20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24 * SUCH DAMAGE.
25 */
26
27#include <sys/cdefs.h>
28__FBSDID("$FreeBSD: head/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c 173247 2007-11-01 08:58:29Z pjd $");
28__FBSDID("$FreeBSD: head/sys/cddl/compat/opensolaris/kern/opensolaris_vfs.c 175202 2008-01-10 01:10:58Z attilio $");
29
30#include <sys/param.h>
31#include <sys/kernel.h>
32#include <sys/systm.h>
33#include <sys/mount.h>
34#include <sys/cred.h>
35#include <sys/vfs.h>
36#include <sys/priv.h>

--- 150 unchanged lines hidden (view full) ---

187 return (EBUSY);
188 }
189 vp->v_iflag |= VI_MOUNT;
190 VI_UNLOCK(vp);
191
192 /*
193 * Allocate and initialize the filesystem.
194 */
29
30#include <sys/param.h>
31#include <sys/kernel.h>
32#include <sys/systm.h>
33#include <sys/mount.h>
34#include <sys/cred.h>
35#include <sys/vfs.h>
36#include <sys/priv.h>

--- 150 unchanged lines hidden (view full) ---

187 return (EBUSY);
188 }
189 vp->v_iflag |= VI_MOUNT;
190 VI_UNLOCK(vp);
191
192 /*
193 * Allocate and initialize the filesystem.
194 */
195 vn_lock(vp, LK_SHARED | LK_RETRY, td);
195 vn_lock(vp, LK_SHARED | LK_RETRY);
196 mp = vfs_mount_alloc(vp, vfsp, fspath, td);
197 VOP_UNLOCK(vp, 0, td);
198
199 mp->mnt_optnew = NULL;
200 vfs_setmntopt(mp, "from", fspec, 0);
201 mp->mnt_optnew = mp->mnt_opt;
202 mp->mnt_opt = NULL;
203

--- 29 unchanged lines hidden (view full) ---

233 mp->mnt_opt = mp->mnt_optnew;
234 (void)VFS_STATFS(mp, &mp->mnt_stat, td);
235 }
236 /*
237 * Prevent external consumers of mount options from reading
238 * mnt_optnew.
239 */
240 mp->mnt_optnew = NULL;
196 mp = vfs_mount_alloc(vp, vfsp, fspath, td);
197 VOP_UNLOCK(vp, 0, td);
198
199 mp->mnt_optnew = NULL;
200 vfs_setmntopt(mp, "from", fspec, 0);
201 mp->mnt_optnew = mp->mnt_opt;
202 mp->mnt_opt = NULL;
203

--- 29 unchanged lines hidden (view full) ---

233 mp->mnt_opt = mp->mnt_optnew;
234 (void)VFS_STATFS(mp, &mp->mnt_stat, td);
235 }
236 /*
237 * Prevent external consumers of mount options from reading
238 * mnt_optnew.
239 */
240 mp->mnt_optnew = NULL;
241 vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
241 vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
242 /*
243 * Put the new filesystem on the mount list after root.
244 */
245#ifdef FREEBSD_NAMECACHE
246 cache_purge(vp);
247#endif
248 if (!error) {
249 vnode_t *mvp;

--- 31 unchanged lines hidden ---
242 /*
243 * Put the new filesystem on the mount list after root.
244 */
245#ifdef FREEBSD_NAMECACHE
246 cache_purge(vp);
247#endif
248 if (!error) {
249 vnode_t *mvp;

--- 31 unchanged lines hidden ---