struct vattr vattr;
vattr.va_mask = AT_FSID | AT_NODEID; /* quick return using this mask. */
+#ifdef AFS_SUN511_ENV
+ code = VOP_GETATTR(vp, &vattr, 0, &afs_osi_cred, NULL);
+#else
code = VOP_GETATTR(vp, &vattr, 0, &afs_osi_cred);
+#endif
if (code) {
osi_Panic("VnodeToIno");
}
vattr.va_mask = AT_FSID | AT_NODEID; /* quick return using this mask. */
AFS_GUNLOCK();
+#ifdef AFS_SUN511_ENV
+ code = VOP_GETATTR(vp, &vattr, 0, &afs_osi_cred, NULL);
+#else
code = VOP_GETATTR(vp, &vattr, 0, &afs_osi_cred);
+#endif
AFS_GLOCK();
if (code) {
osi_Panic("VnodeToDev");
MObtainWriteLock(&afs_xosi, 578);
vattr.va_mask = AT_SIZE;
AFS_GUNLOCK();
+#ifdef AFS_SUN511_ENV
+ code = VOP_GETATTR(vp, &vattr, 0, &afs_osi_cred, NULL);
+#else
code = VOP_GETATTR(vp, &vattr, 0, &afs_osi_cred);
+#endif
AFS_GLOCK();
if (code) {
osi_Panic("VnodeToSize");
/* Ufs doesn't seem to care about the flags so we pass 0 for now */
tvattr.va_mask = AT_ALL;
AFS_GUNLOCK();
+#ifdef AFS_SUN511_ENV
+ code = VOP_GETATTR(afile->vnode, &tvattr, 0, &afs_osi_cred, NULL);
+#else
code = VOP_GETATTR(afile->vnode, &tvattr, 0, &afs_osi_cred);
+#endif
AFS_GLOCK();
if (code == 0) {
astat->size = tvattr.va_size;
}
#ifdef AFS_SUN510_ENV
+#ifdef AFS_SUN511_ENV
+static struct vfsdef_v4 afs_vfsdef = {
+ VFSDEF_VERSION,
+ "afs",
+ afsinit,
+ 0,
+ NULL
+};
+#else
static struct vfsdef_v3 afs_vfsdef = {
VFSDEF_VERSION,
"afs",
afsinit,
0
};
+#endif
#else
static struct vfssw afs_vfw = {
"afs",
}
#ifdef AFS_SUN54_ENV
+#ifdef AFS_SUN511_ENV
+extern void
+afs_dispose(struct vnode *vp, struct page *p, int fl, int dn, struct cred *cr, struct caller_context_t *ct)
+{
+ fs_dispose(vp, p, fl, dn, cr,ct);
+}
+
+int
+afs_setsecattr(struct vnode *vp, vsecattr_t *vsecattr, int flag, struct cred *creds, struct caller_context_t *ct)
+{
+ return ENOSYS;
+}
+
+int
+afs_getsecattr(struct vnode *vp, vsecattr_t *vsecattr, int flag, struct cred *creds, struct caller_context_t *ct)
+{
+ return fs_fab_acl(vp, vsecattr, flag, creds,ct);
+}
+#else
extern void
afs_dispose(vp, p, fl, dn, cr)
struct vnode *vp;
return fs_fab_acl(vp, vsecattr, flag, creds);
}
#endif
+#endif
#ifdef AFS_GLOBAL_SUNLOCK
extern int gafs_open(), gafs_close(), afs_ioctl(), gafs_access();
#if defined(AFS_SUN510_ENV)
if (vp && !IsAfsVnode(vp)) {
struct vnode *realvp;
-
- if (VOP_REALVP(vp, &realvp) == 0) {
+ if
+#ifdef AFS_SUN511_ENV
+ (VOP_REALVP(vp, &realvp, NULL) == 0)
+#else
+ (VOP_REALVP(vp, &realvp) == 0)
+#endif
+{
struct vnode *oldvp = vp;
VN_HOLD(realvp);
/* Was sockfs_sounbind(so, 0); sockfs_sockfree(so); That's wrong */
vp = SOTOV(so);
+ #ifdef AFS_SUN511_ENV
+ VOP_CLOSE(vp, FREAD|FWRITE, 1, (offset_t)0, CRED(), NULL);
+ #else
VOP_CLOSE(vp, FREAD|FWRITE, 1, (offset_t)0, CRED());
+ #endif
VN_RELE(vp);
return 0;