summaryrefslogtreecommitdiffstats
path: root/sys/fs/nfsserver
diff options
context:
space:
mode:
authorrmacklem <rmacklem@FreeBSD.org>2011-05-22 01:07:54 +0000
committerrmacklem <rmacklem@FreeBSD.org>2011-05-22 01:07:54 +0000
commitfbb8a5e8ec5608b837e3fd521703f5642de04e13 (patch)
treed4de50d8fbaaca75e31ae95cbc9c63c287ea95d9 /sys/fs/nfsserver
parent3dd8ae4222dacd974bc67c89db57fbe97d36ed79 (diff)
downloadFreeBSD-src-fbb8a5e8ec5608b837e3fd521703f5642de04e13.zip
FreeBSD-src-fbb8a5e8ec5608b837e3fd521703f5642de04e13.tar.gz
Add a lock flags argument to the VFS_FHTOVP() file system
method, so that callers can indicate the minimum vnode locking requirement. This will allow some file systems to choose to return a LK_SHARED locked vnode when LK_SHARED is specified for the flags argument. This patch only adds the flag. It does not change any file system to use it and all callers specify LK_EXCLUSIVE, so file system semantics are not changed. Reviewed by: kib
Diffstat (limited to 'sys/fs/nfsserver')
-rw-r--r--sys/fs/nfsserver/nfs_nfsdport.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c
index 11c287f..d62be99 100644
--- a/sys/fs/nfsserver/nfs_nfsdport.c
+++ b/sys/fs/nfsserver/nfs_nfsdport.c
@@ -2551,7 +2551,7 @@ nfsvno_fhtovp(struct mount *mp, fhandle_t *fhp, struct sockaddr *nam,
if (VFS_NEEDSGIANT(mp))
error = ESTALE;
else
- error = VFS_FHTOVP(mp, &fhp->fh_fid, vpp);
+ error = VFS_FHTOVP(mp, &fhp->fh_fid, LK_EXCLUSIVE, vpp);
if (error != 0)
/* Make sure the server replies ESTALE to the client. */
error = ESTALE;
@@ -2834,7 +2834,7 @@ nfsvno_getvp(fhandle_t *fhp)
mp = vfs_busyfs(&fhp->fh_fsid);
if (mp == NULL)
return (NULL);
- error = VFS_FHTOVP(mp, &fhp->fh_fid, &vp);
+ error = VFS_FHTOVP(mp, &fhp->fh_fid, LK_EXCLUSIVE, &vp);
vfs_unbusy(mp);
if (error)
return (NULL);
OpenPOWER on IntegriCloud