[OpenAFS-devel] Re: revision 1.4 - 1.5 of SOLARIS/osi_inode.c breaks sun4x_56
Nickolai Zeldovich
kolya@MIT.EDU
Thu, 19 Apr 2001 17:17:00 -0400
> Solaris 5.6 appears to not have the vfs_dqrwlock member of struct ufsvfs.
Oops.. Attached is an obvious patch to fix the problem.
-- kolya
--- afs/SOLARIS/osi_inode.c 2001/04/14 17:34:32 1.5
+++ afs/SOLARIS/osi_inode.c 2001/04/19 21:14:46
@@ -58,9 +58,13 @@
}
ufsvfsp = (struct ufsvfs *)vfsp->vfs_data;
+#if defined(AFS_SUN57_ENV)
rw_enter(&ufsvfsp->vfs_dqrwlock, RW_READER);
+#endif
code = (*ufs_igetp)(vfsp, inode, &ip, credp);
+#if defined(AFS_SUN57_ENV)
rw_exit(&ufsvfsp->vfs_dqrwlock);
+#endif
if (code) {
*perror = BAD_IGET;
@@ -162,10 +166,14 @@
ufsvfsp = ip->i_ufsvfs;
rw_enter(&ip->i_rwlock, RW_WRITER);
+#if defined(AFS_SUN57_ENV)
rw_enter(&ufsvfsp->vfs_dqrwlock, RW_READER);
+#endif
rw_enter(&ip->i_contents, RW_WRITER);
code = (*ufs_iallocp)(ip, near_inode, 0, &newip, credp);
+#if defined(AFS_SUN57_ENV)
rw_exit(&ufsvfsp->vfs_dqrwlock);
+#endif
rw_exit(&ip->i_rwlock);
AFS_ITIMES(ip);