nfs_nfsdport.c (221615) | nfs_nfsdport.c (222167) |
---|---|
1/*- 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Rick Macklem at The University of Guelph. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 18 unchanged lines hidden (view full) --- 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * 32 */ 33 34#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 1989, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Rick Macklem at The University of Guelph. 7 * 8 * Redistribution and use in source and binary forms, with or without --- 18 unchanged lines hidden (view full) --- 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * 32 */ 33 34#include <sys/cdefs.h> |
35__FBSDID("$FreeBSD: head/sys/fs/nfsserver/nfs_nfsdport.c 221615 2011-05-08 01:01:27Z rmacklem $"); | 35__FBSDID("$FreeBSD: head/sys/fs/nfsserver/nfs_nfsdport.c 222167 2011-05-22 01:07:54Z rmacklem $"); |
36 37/* 38 * Functions that perform the vfs operations required by the routines in 39 * nfsd_serv.c. It is hoped that this change will make the server more 40 * portable. 41 */ 42 43#include <fs/nfs/nfsport.h> --- 2502 unchanged lines hidden (view full) --- 2546{ 2547 int i, error, *secflavors; 2548 2549 *credp = NULL; 2550 exp->nes_numsecflavor = 0; 2551 if (VFS_NEEDSGIANT(mp)) 2552 error = ESTALE; 2553 else | 36 37/* 38 * Functions that perform the vfs operations required by the routines in 39 * nfsd_serv.c. It is hoped that this change will make the server more 40 * portable. 41 */ 42 43#include <fs/nfs/nfsport.h> --- 2502 unchanged lines hidden (view full) --- 2546{ 2547 int i, error, *secflavors; 2548 2549 *credp = NULL; 2550 exp->nes_numsecflavor = 0; 2551 if (VFS_NEEDSGIANT(mp)) 2552 error = ESTALE; 2553 else |
2554 error = VFS_FHTOVP(mp, &fhp->fh_fid, vpp); | 2554 error = VFS_FHTOVP(mp, &fhp->fh_fid, LK_EXCLUSIVE, vpp); |
2555 if (error != 0) 2556 /* Make sure the server replies ESTALE to the client. */ 2557 error = ESTALE; 2558 if (nam && !error) { 2559 error = VFS_CHECKEXP(mp, nam, &exp->nes_exflag, credp, 2560 &exp->nes_numsecflavor, &secflavors); 2561 if (error) { 2562 if (nfs_rootfhset) { --- 266 unchanged lines hidden (view full) --- 2829{ 2830 struct mount *mp; 2831 struct vnode *vp; 2832 int error; 2833 2834 mp = vfs_busyfs(&fhp->fh_fsid); 2835 if (mp == NULL) 2836 return (NULL); | 2555 if (error != 0) 2556 /* Make sure the server replies ESTALE to the client. */ 2557 error = ESTALE; 2558 if (nam && !error) { 2559 error = VFS_CHECKEXP(mp, nam, &exp->nes_exflag, credp, 2560 &exp->nes_numsecflavor, &secflavors); 2561 if (error) { 2562 if (nfs_rootfhset) { --- 266 unchanged lines hidden (view full) --- 2829{ 2830 struct mount *mp; 2831 struct vnode *vp; 2832 int error; 2833 2834 mp = vfs_busyfs(&fhp->fh_fsid); 2835 if (mp == NULL) 2836 return (NULL); |
2837 error = VFS_FHTOVP(mp, &fhp->fh_fid, &vp); | 2837 error = VFS_FHTOVP(mp, &fhp->fh_fid, LK_EXCLUSIVE, &vp); |
2838 vfs_unbusy(mp); 2839 if (error) 2840 return (NULL); 2841 return (vp); 2842} 2843 2844/* 2845 * Do a local VOP_ADVLOCK(). --- 379 unchanged lines hidden --- | 2838 vfs_unbusy(mp); 2839 if (error) 2840 return (NULL); 2841 return (vp); 2842} 2843 2844/* 2845 * Do a local VOP_ADVLOCK(). --- 379 unchanged lines hidden --- |