solaris10-20040624
[openafs.git] / src / afs / VNOPS / afs_vnop_write.c
index 762f5c7..af43787 100644 (file)
@@ -530,9 +530,19 @@ afs_UFSWrite(register struct vcache *avc, struct uio *auio, int aio,
                      &tuio, NULL, NULL, -1);
 #elif defined(AFS_SUN5_ENV)
        AFS_GUNLOCK();
+#ifdef AFS_SUN510_ENV
+       {
+           caller_context_t ct;
+
+           VOP_RWLOCK(tfile->vnode, 1, &ct);
+           code = VOP_WRITE(tfile->vnode, &tuio, 0, afs_osi_credp, &ct);
+           VOP_RWUNLOCK(tfile->vnode, 1, &ct);
+       }
+#else
        VOP_RWLOCK(tfile->vnode, 1);
        code = VOP_WRITE(tfile->vnode, &tuio, 0, afs_osi_credp);
        VOP_RWUNLOCK(tfile->vnode, 1);
+#endif
        AFS_GLOCK();
        if (code == ENOSPC)
            afs_warnuser