summaryrefslogtreecommitdiff
path: root/sys/fs/nfsclient/nfs_clvnops.c
diff options
context:
space:
mode:
authorRick Macklem <rmacklem@FreeBSD.org>2011-04-16 23:20:21 +0000
committerRick Macklem <rmacklem@FreeBSD.org>2011-04-16 23:20:21 +0000
commit4b3a38ecdfcdce8890dd23caa80e1b6a830422e0 (patch)
treed5f08b6ed7d6fa556fc0a0c4ed348c7cfeeac9ca /sys/fs/nfsclient/nfs_clvnops.c
parentf8a2f6b03af9a26697367aafbb3ad30dbf1b94b8 (diff)
downloadsrc-test2-4b3a38ecdfcdce8890dd23caa80e1b6a830422e0.tar.gz
src-test2-4b3a38ecdfcdce8890dd23caa80e1b6a830422e0.zip
Notes
Diffstat (limited to 'sys/fs/nfsclient/nfs_clvnops.c')
-rw-r--r--sys/fs/nfsclient/nfs_clvnops.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/sys/fs/nfsclient/nfs_clvnops.c b/sys/fs/nfsclient/nfs_clvnops.c
index 0308c7f8c816..0260d51516e3 100644
--- a/sys/fs/nfsclient/nfs_clvnops.c
+++ b/sys/fs/nfsclient/nfs_clvnops.c
@@ -1156,7 +1156,8 @@ nfs_lookup(struct vop_lookup_args *ap)
FREE((caddr_t)nfhp, M_NFSFH);
return (EISDIR);
}
- error = nfscl_nget(mp, dvp, nfhp, cnp, td, &np, NULL);
+ error = nfscl_nget(mp, dvp, nfhp, cnp, td, &np, NULL,
+ LK_EXCLUSIVE);
if (error)
return (error);
newvp = NFSTOV(np);
@@ -1185,7 +1186,8 @@ nfs_lookup(struct vop_lookup_args *ap)
return (error);
}
VOP_UNLOCK(dvp, 0);
- error = nfscl_nget(mp, dvp, nfhp, cnp, td, &np, NULL);
+ error = nfscl_nget(mp, dvp, nfhp, cnp, td, &np, NULL,
+ cnp->cn_lkflags);
if (error == 0)
newvp = NFSTOV(np);
vfs_unbusy(mp);
@@ -1213,7 +1215,8 @@ nfs_lookup(struct vop_lookup_args *ap)
(void) nfscl_loadattrcache(&newvp, &nfsva, NULL, NULL,
0, 1);
} else {
- error = nfscl_nget(mp, dvp, nfhp, cnp, td, &np, NULL);
+ error = nfscl_nget(mp, dvp, nfhp, cnp, td, &np, NULL,
+ cnp->cn_lkflags);
if (error)
return (error);
newvp = NFSTOV(np);
@@ -1395,7 +1398,7 @@ nfs_mknodrpc(struct vnode *dvp, struct vnode **vpp, struct componentname *cnp,
NULL);
if (nfhp)
error = nfscl_nget(dvp->v_mount, dvp, nfhp, cnp,
- cnp->cn_thread, &np, NULL);
+ cnp->cn_thread, &np, NULL, LK_EXCLUSIVE);
}
if (dattrflag)
(void) nfscl_loadattrcache(&dvp, &dnfsva, NULL, NULL, 0, 1);
@@ -1508,7 +1511,7 @@ again:
NULL);
if (nfhp != NULL)
error = nfscl_nget(dvp->v_mount, dvp, nfhp, cnp,
- cnp->cn_thread, &np, NULL);
+ cnp->cn_thread, &np, NULL, LK_EXCLUSIVE);
}
if (dattrflag)
(void) nfscl_loadattrcache(&dvp, &dnfsva, NULL, NULL, 0, 1);
@@ -1931,7 +1934,7 @@ nfs_symlink(struct vop_symlink_args *ap)
&nfsva, &nfhp, &attrflag, &dattrflag, NULL);
if (nfhp) {
ret = nfscl_nget(dvp->v_mount, dvp, nfhp, cnp, cnp->cn_thread,
- &np, NULL);
+ &np, NULL, LK_EXCLUSIVE);
if (!ret)
newvp = NFSTOV(np);
else if (!error)
@@ -2014,7 +2017,7 @@ nfs_mkdir(struct vop_mkdir_args *ap)
dnp->n_attrstamp = 0;
if (nfhp) {
ret = nfscl_nget(dvp->v_mount, dvp, nfhp, cnp, cnp->cn_thread,
- &np, NULL);
+ &np, NULL, LK_EXCLUSIVE);
if (!ret) {
newvp = NFSTOV(np);
if (attrflag)
@@ -2389,7 +2392,7 @@ printf("replace=%s\n",nnn);
cn.cn_nameptr = name;
cn.cn_namelen = len;
error = nfscl_nget(dvp->v_mount, dvp, nfhp, &cn, td,
- &np, NULL);
+ &np, NULL, LK_EXCLUSIVE);
if (error)
return (error);
newvp = NFSTOV(np);