Deleted Added
full compact
vfs_export.c (139804) vfs_export.c (141634)
1/*-
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

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

30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95
35 */
36
37#include <sys/cdefs.h>
1/*-
2 * Copyright (c) 1989, 1993
3 * The Regents of the University of California. All rights reserved.
4 * (c) UNIX System Laboratories, Inc.
5 * All or some portions of this file are derived from material licensed
6 * to the University of California by American Telephone and Telegraph
7 * Co. or Unix System Laboratories, Inc. and are reproduced herein with
8 * the permission of UNIX System Laboratories, Inc.

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

30 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
31 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
32 * SUCH DAMAGE.
33 *
34 * @(#)vfs_subr.c 8.31 (Berkeley) 5/26/95
35 */
36
37#include <sys/cdefs.h>
38__FBSDID("$FreeBSD: head/sys/kern/vfs_export.c 139804 2005-01-06 23:35:40Z imp $");
38__FBSDID("$FreeBSD: head/sys/kern/vfs_export.c 141634 2005-02-10 12:25:38Z phk $");
39
40#include <sys/param.h>
41#include <sys/dirent.h>
42#include <sys/domain.h>
43#include <sys/kernel.h>
44#include <sys/lock.h>
45#include <sys/malloc.h>
46#include <sys/mbuf.h>

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

53#include <net/radix.h>
54
55static MALLOC_DEFINE(M_NETADDR, "Export Host", "Export host address structure");
56
57static void vfs_free_addrlist(struct netexport *nep);
58static int vfs_free_netcred(struct radix_node *rn, void *w);
59static int vfs_hang_addrlist(struct mount *mp, struct netexport *nep,
60 struct export_args *argp);
39
40#include <sys/param.h>
41#include <sys/dirent.h>
42#include <sys/domain.h>
43#include <sys/kernel.h>
44#include <sys/lock.h>
45#include <sys/malloc.h>
46#include <sys/mbuf.h>

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

53#include <net/radix.h>
54
55static MALLOC_DEFINE(M_NETADDR, "Export Host", "Export host address structure");
56
57static void vfs_free_addrlist(struct netexport *nep);
58static int vfs_free_netcred(struct radix_node *rn, void *w);
59static int vfs_hang_addrlist(struct mount *mp, struct netexport *nep,
60 struct export_args *argp);
61static struct netcred *vfs_export_lookup(struct mount *, struct sockaddr *);
61
62/*
63 * Network address lookup element
64 */
65struct netcred {
66 struct radix_node netc_rnodes[2];
67 int netc_exflags;
68 struct ucred netc_anon;

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

339}
340
341/*
342 * Used by the filesystems to determine if a given network address
343 * (passed in 'nam') is present in thier exports list, returns a pointer
344 * to struct netcred so that the filesystem can examine it for
345 * access rights (read/write/etc).
346 */
62
63/*
64 * Network address lookup element
65 */
66struct netcred {
67 struct radix_node netc_rnodes[2];
68 int netc_exflags;
69 struct ucred netc_anon;

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

340}
341
342/*
343 * Used by the filesystems to determine if a given network address
344 * (passed in 'nam') is present in thier exports list, returns a pointer
345 * to struct netcred so that the filesystem can examine it for
346 * access rights (read/write/etc).
347 */
347struct netcred *
348vfs_export_lookup(mp, nam)
349 register struct mount *mp;
350 struct sockaddr *nam;
348static struct netcred *
349vfs_export_lookup(struct mount *mp, struct sockaddr *nam)
351{
352 struct netexport *nep;
353 register struct netcred *np;
354 register struct radix_node_head *rnh;
355 struct sockaddr *saddr;
356
357 nep = mp->mnt_export;
358 if (nep == NULL)

--- 53 unchanged lines hidden ---
350{
351 struct netexport *nep;
352 register struct netcred *np;
353 register struct radix_node_head *rnh;
354 struct sockaddr *saddr;
355
356 nep = mp->mnt_export;
357 if (nep == NULL)

--- 53 unchanged lines hidden ---