summaryrefslogtreecommitdiffstats
path: root/sys/fs/nwfs
diff options
context:
space:
mode:
Diffstat (limited to 'sys/fs/nwfs')
-rw-r--r--sys/fs/nwfs/nwfs_io.c6
-rw-r--r--sys/fs/nwfs/nwfs_node.c5
-rw-r--r--sys/fs/nwfs/nwfs_vfsops.c2
-rw-r--r--sys/fs/nwfs/nwfs_vnops.c6
4 files changed, 12 insertions, 7 deletions
diff --git a/sys/fs/nwfs/nwfs_io.c b/sys/fs/nwfs/nwfs_io.c
index 9c7d5fa..ffcef2a 100644
--- a/sys/fs/nwfs/nwfs_io.c
+++ b/sys/fs/nwfs/nwfs_io.c
@@ -599,9 +599,13 @@ nwfs_vinvalbuf(vp, flags, cred, td, intrflg)
/* struct nwmount *nmp = VTONWFS(vp);*/
int error = 0, slpflag, slptimeo;
- if (vp->v_flag & VXLOCK) {
+ VI_LOCK(vp);
+ if (vp->v_iflag & VI_XLOCK) {
+ VI_UNLOCK(vp);
return (0);
}
+ VI_UNLOCK(vp);
+
if (intrflg) {
slpflag = PCATCH;
slptimeo = 2 * hz;
diff --git a/sys/fs/nwfs/nwfs_node.c b/sys/fs/nwfs/nwfs_node.c
index d8693fa..daf51e1 100644
--- a/sys/fs/nwfs/nwfs_node.c
+++ b/sys/fs/nwfs/nwfs_node.c
@@ -203,8 +203,9 @@ rescan:
LIST_INSERT_HEAD(nhpp, np, n_hash);
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, td);
lockmgr(&nwhashlock, LK_RELEASE, NULL, td);
-
- if (vp->v_type == VDIR && dvp && (dvp->v_flag & VROOT) == 0) {
+
+ ASSERT_VOP_LOCKED(dvp, "nwfs_allocvp");
+ if (vp->v_type == VDIR && dvp && (dvp->v_vflag & VV_ROOT) == 0) {
np->n_flag |= NREFPARENT;
vref(dvp);
}
diff --git a/sys/fs/nwfs/nwfs_vfsops.c b/sys/fs/nwfs/nwfs_vfsops.c
index dc7d634..76776d9 100644
--- a/sys/fs/nwfs/nwfs_vfsops.c
+++ b/sys/fs/nwfs/nwfs_vfsops.c
@@ -340,7 +340,7 @@ nwfs_root(struct mount *mp, struct vnode **vpp) {
error = nwfs_nget(mp, nmp->n_rootent, &fattr, NULL, &vp);
if (error)
return (error);
- vp->v_flag |= VROOT;
+ vp->v_vflag |= VV_ROOT;
np = VTONW(vp);
if (nmp->m.root_path[0] == 0)
np->n_flag |= NVOLUME;
diff --git a/sys/fs/nwfs/nwfs_vnops.c b/sys/fs/nwfs/nwfs_vnops.c
index 9d773f8..b62f4f8 100644
--- a/sys/fs/nwfs/nwfs_vnops.c
+++ b/sys/fs/nwfs/nwfs_vnops.c
@@ -289,7 +289,7 @@ nwfs_getattr(ap)
int error;
u_int32_t oldsize;
- NCPVNDEBUG("%lx:%d: '%s' %d\n", (long)vp, nmp->n_volume, np->n_name, (vp->v_flag & VROOT) != 0);
+ NCPVNDEBUG("%lx:%d: '%s' %d\n", (long)vp, nmp->n_volume, np->n_name, (vp->v_vflag & VV_ROOT) != 0);
error = nwfs_attr_cachelookup(vp, va);
if (!error) return 0;
NCPVNDEBUG("not in cache\n");
@@ -859,7 +859,7 @@ nwfs_lookup(ap)
if (dvp->v_type != VDIR)
return (ENOTDIR);
- if ((flags & ISDOTDOT) && (dvp->v_flag & VROOT)) {
+ if ((flags & ISDOTDOT) && (dvp->v_vflag & VV_ROOT)) {
printf("nwfs_lookup: invalid '..'\n");
return EIO;
}
@@ -877,7 +877,7 @@ nwfs_lookup(ap)
nmp = VFSTONWFS(mp);
dnp = VTONW(dvp);
/*
-printf("dvp %d:%d:%d\n", (int)mp, (int)dvp->v_flag & VROOT, (int)flags & ISDOTDOT);
+printf("dvp %d:%d:%d\n", (int)mp, (int)dvp->v_vflag & VV_ROOT, (int)flags & ISDOTDOT);
*/
error = ncp_pathcheck(cnp->cn_nameptr, cnp->cn_namelen, &nmp->m.nls,
(nameiop == CREATE || nameiop == RENAME) && (nmp->m.nls.opt & NWHP_NOSTRICT) == 0);
OpenPOWER on IntegriCloud