diff options
author | rmacklem <rmacklem@FreeBSD.org> | 2011-04-16 23:20:21 +0000 |
---|---|---|
committer | rmacklem <rmacklem@FreeBSD.org> | 2011-04-16 23:20:21 +0000 |
commit | d77942ccd46b9d83e6034e871a4c714b3ab64614 (patch) | |
tree | d5f08b6ed7d6fa556fc0a0c4ed348c7cfeeac9ca /sys/fs/nfsclient/nfs_clnode.c | |
parent | 8ae8da4156ef9141be0d9415a04c13dff5ce464f (diff) | |
download | FreeBSD-src-d77942ccd46b9d83e6034e871a4c714b3ab64614.zip FreeBSD-src-d77942ccd46b9d83e6034e871a4c714b3ab64614.tar.gz |
Add a lktype flags argument to nfscl_nget() and ncl_nget() in the
experimental NFS client so that its nfs_lookup() function can use
cn_lkflags in a manner analagous to the regular NFS client.
MFC after: 2 weeks
Diffstat (limited to 'sys/fs/nfsclient/nfs_clnode.c')
-rw-r--r-- | sys/fs/nfsclient/nfs_clnode.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/fs/nfsclient/nfs_clnode.c b/sys/fs/nfsclient/nfs_clnode.c index c6b212a..d4d652e 100644 --- a/sys/fs/nfsclient/nfs_clnode.c +++ b/sys/fs/nfsclient/nfs_clnode.c @@ -86,7 +86,8 @@ ncl_nhuninit(void) * nfsnode structure is returned. */ int -ncl_nget(struct mount *mntp, u_int8_t *fhp, int fhsize, struct nfsnode **npp) +ncl_nget(struct mount *mntp, u_int8_t *fhp, int fhsize, struct nfsnode **npp, + int lkflags) { struct thread *td = curthread; /* XXX */ struct nfsnode *np; @@ -106,7 +107,7 @@ ncl_nget(struct mount *mntp, u_int8_t *fhp, int fhsize, struct nfsnode **npp) M_NFSFH, M_WAITOK); bcopy(fhp, &nfhp->nfh_fh[0], fhsize); nfhp->nfh_len = fhsize; - error = vfs_hash_get(mntp, hash, LK_EXCLUSIVE, + error = vfs_hash_get(mntp, hash, lkflags, td, &nvp, newnfs_vncmpf, nfhp); FREE(nfhp, M_NFSFH); if (error) @@ -168,7 +169,7 @@ ncl_nget(struct mount *mntp, u_int8_t *fhp, int fhsize, struct nfsnode **npp) uma_zfree(newnfsnode_zone, np); return (error); } - error = vfs_hash_insert(vp, hash, LK_EXCLUSIVE, + error = vfs_hash_insert(vp, hash, lkflags, td, &nvp, newnfs_vncmpf, np->n_fhp); if (error) return (error); |