diff options
author | alfred <alfred@FreeBSD.org> | 2002-06-30 05:23:58 +0000 |
---|---|---|
committer | alfred <alfred@FreeBSD.org> | 2002-06-30 05:23:58 +0000 |
commit | b7edb33754da2677f5954d960946833612ef6c51 (patch) | |
tree | 4d4de6a7382883ade173d5b23f33674ebc5f05bc | |
parent | f6f518b207e19ee2f8ab4870471673b934719bfd (diff) | |
download | FreeBSD-src-b7edb33754da2677f5954d960946833612ef6c51.zip FreeBSD-src-b7edb33754da2677f5954d960946833612ef6c51.tar.gz |
Partial backout of 1.318, remove error handling added because it may be
incorrect.
Requested by: bde
-rw-r--r-- | sys/kern/vfs_export.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c index a080c0c..22927bd 100644 --- a/sys/kern/vfs_export.c +++ b/sys/kern/vfs_export.c @@ -154,21 +154,9 @@ vfs_hang_addrlist(mp, nep, argp) } } rn = (*rnh->rnh_addaddr)(saddr, smask, rnh, np->netc_rnodes); - if (rn == 0) { - /* - * One of the reasons that rnh_addaddr may fail is that - * the entry already exists. To check for this case, we - * look up the entry to see if it is there. If so, we - * do not need to make a new entry but do return success. - */ - free(np, M_NETADDR); - rn = (*rnh->rnh_matchaddr)(saddr, rnh); - if (rn != 0 && (rn->rn_flags & RNF_ROOT) == 0 && - ((struct netcred *)rn)->netc_exflags == argp->ex_flags && - !bcmp(&((struct netcred *)rn)->netc_anon, - &argp->ex_anon, sizeof(struct ucred))) - return (0); - return (EPERM); + if (rn == 0 || np != (struct netcred *)rn) { /* already exists */ + error = EPERM; + goto out; } np->netc_exflags = argp->ex_flags; bzero(&np->netc_anon, sizeof(np->netc_anon)); |