FBSD, DFBSD (future) call afs_FakeOpen in the write path

Call afs_FakeOpen in the write path, even though nominally
it is AFS_VM_RDWR_ENV.

Change-Id: I6d24c9631f80058e3dd0d6f284ca7792253ceaaa
Reviewed-on: http://gerrit.openafs.org/2623
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
This commit is contained in:
Matt Benjamin 2010-08-28 21:57:38 -04:00 committed by Derrick Brashear
parent 8334b40376
commit b727c1e748
7 changed files with 10 additions and 5 deletions

View File

@ -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);

View File

@ -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

View File

@ -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 */

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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