diff --git a/src/afs/VNOPS/afs_vnop_write.c b/src/afs/VNOPS/afs_vnop_write.c index 9d582f0ced..c0672e83d9 100644 --- a/src/afs/VNOPS/afs_vnop_write.c +++ b/src/afs/VNOPS/afs_vnop_write.c @@ -185,7 +185,7 @@ afs_MemWrite(struct vcache *avc, struct uio *auio, int aio, return (EFBIG); } #endif -#ifdef AFS_VM_RDWR_ENV +#if defined(AFS_VM_RDWR_ENV) && !defined(AFS_FAKEOPEN_ENV) /* * If write is implemented via VM, afs_FakeOpen() is called from the * high-level write op. @@ -292,7 +292,7 @@ afs_MemWrite(struct vcache *avc, struct uio *auio, int aio, } #endif } -#ifndef AFS_VM_RDWR_ENV +#if !defined(AFS_VM_RDWR_ENV) || defined(AFS_FAKEOPEN_ENV) afs_FakeClose(avc, acred); #endif if (error && !avc->vc_error) @@ -406,7 +406,7 @@ afs_UFSWrite(struct vcache *avc, struct uio *auio, int aio, return (EFBIG); } #endif -#ifdef AFS_VM_RDWR_ENV +#if defined(AFS_VM_RDWR_ENV) && !defined(AFS_FAKEOPEN_ENV) /* * If write is implemented via VM, afs_FakeOpen() is called from the * high-level write op. @@ -601,7 +601,7 @@ afs_UFSWrite(struct vcache *avc, struct uio *auio, int aio, } #endif } -#ifndef AFS_VM_RDWR_ENV +#if !defined(AFS_VM_RDWR_ENV) || defined(AFS_FAKEOPEN_ENV) afs_FakeClose(avc, acred); #endif error = afs_CheckCode(error, &treq, 7); diff --git a/src/config/param.i386_dfbsd_23.h b/src/config/param.i386_dfbsd_23.h index 677ef8f0ca..dd8283af22 100644 --- a/src/config/param.i386_dfbsd_23.h +++ b/src/config/param.i386_dfbsd_23.h @@ -9,6 +9,7 @@ #define AFS_HAVE_FFS 1 /* Use system's ffs. */ #define AFS_HAVE_STATVFS 1 /* System doesn't support statvfs */ #define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ +#define AFS_FAKEOPEN_ENV 1 /* call afs_FakeOpen as if !AFS_VM_RDWR */ #ifndef UKERNEL diff --git a/src/config/param.i386_fbsd_70.h b/src/config/param.i386_fbsd_70.h index b624759324..ba22cf48c6 100644 --- a/src/config/param.i386_fbsd_70.h +++ b/src/config/param.i386_fbsd_70.h @@ -9,7 +9,7 @@ #define AFS_HAVE_FFS 1 /* Use system's ffs. */ #define AFS_HAVE_STATVFS 1 /* System doesn't support statvfs */ #define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ - +#define AFS_FAKEOPEN_ENV 1 /* call afs_FakeOpen as if !AFS_VM_RDWR */ #ifndef UKERNEL /* This section for kernel libafs compiles only */ diff --git a/src/config/param.i386_fbsd_71.h b/src/config/param.i386_fbsd_71.h index 7bd6b60aa5..664d70ae0f 100644 --- a/src/config/param.i386_fbsd_71.h +++ b/src/config/param.i386_fbsd_71.h @@ -9,6 +9,7 @@ #define AFS_HAVE_FFS 1 /* Use system's ffs. */ #define AFS_HAVE_STATVFS 1 /* System doesn't support statvfs */ #define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ +#define AFS_FAKEOPEN_ENV 1 /* call afs_FakeOpen as if !AFS_VM_RDWR */ #ifndef UKERNEL diff --git a/src/config/param.i386_fbsd_80.h b/src/config/param.i386_fbsd_80.h index 002db22e66..8128275510 100644 --- a/src/config/param.i386_fbsd_80.h +++ b/src/config/param.i386_fbsd_80.h @@ -9,6 +9,7 @@ #define AFS_HAVE_FFS 1 /* Use system's ffs. */ #define AFS_HAVE_STATVFS 1 /* System doesn't support statvfs */ #define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ +#define AFS_FAKEOPEN_ENV 1 /* call afs_FakeOpen as if !AFS_VM_RDWR */ #ifndef UKERNEL diff --git a/src/config/param.i386_fbsd_81.h b/src/config/param.i386_fbsd_81.h index cf62adc9e3..b2469a7c30 100644 --- a/src/config/param.i386_fbsd_81.h +++ b/src/config/param.i386_fbsd_81.h @@ -9,6 +9,7 @@ #define AFS_HAVE_FFS 1 /* Use system's ffs. */ #define AFS_HAVE_STATVFS 1 /* System doesn't support statvfs */ #define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ +#define AFS_FAKEOPEN_ENV 1 /* call afs_FakeOpen as if !AFS_VM_RDWR */ #ifndef UKERNEL diff --git a/src/config/param.i386_fbsd_90.h b/src/config/param.i386_fbsd_90.h index 28a38eb4fa..46fd4047f9 100644 --- a/src/config/param.i386_fbsd_90.h +++ b/src/config/param.i386_fbsd_90.h @@ -9,6 +9,7 @@ #define AFS_HAVE_FFS 1 /* Use system's ffs. */ #define AFS_HAVE_STATVFS 1 /* System doesn't support statvfs */ #define AFS_VM_RDWR_ENV 1 /* read/write implemented via VM */ +#define AFS_FAKEOPEN_ENV 1 /* call afs_FakeOpen as if !AFS_VM_RDWR */ #ifndef UKERNEL