mirror of
https://git.openafs.org/openafs.git
synced 2025-01-18 23:10:58 +00:00
FBSD: Use vm_object_mightbedirty when available
FreeBSD commit 67d0e29304805e43b17e5c27e5a6c566d800a24c (Replace OBJ_MIGHTBEDIRTY with a system using atomics...) removed the OBJ_MIGHTBEDIRTY flag, effectively replacing it with the vm_object_mightbedirty() function. Use the new function. Change-Id: Ic4dd47896dd60e4371ffba65648bc6c2e94c1542 Reviewed-on: https://gerrit.openafs.org/15162 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Michael Meffie <mmeffie@sinenomine.net> Reviewed-by: Andrew Deason <adeason@sinenomine.net>
This commit is contained in:
parent
8495165c3d
commit
ccd5cb381e
@ -61,6 +61,13 @@
|
|||||||
#define AFS_VM_OBJECT_WUNLOCK(o) VM_OBJECT_UNLOCK(o)
|
#define AFS_VM_OBJECT_WUNLOCK(o) VM_OBJECT_UNLOCK(o)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* r354158 removed OBJ_MIGHTBEDIRTY, use vm_object_mightbedirty instead */
|
||||||
|
#if __FreeBSD_version >= 1300054
|
||||||
|
# define AFS_VM_OBJECT_MIGHTBEDIRTY(o) vm_object_mightbedirty(o)
|
||||||
|
#else
|
||||||
|
# define AFS_VM_OBJECT_MIGHTBEDIRTY(o) (((o)->flags & OBJ_MIGHTBEDIRTY) != 0)
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Try to discard pages, in order to recycle a vcache entry.
|
/* Try to discard pages, in order to recycle a vcache entry.
|
||||||
*
|
*
|
||||||
* We also make some sanity checks: ref count, open count, held locks.
|
* We also make some sanity checks: ref count, open count, held locks.
|
||||||
@ -123,7 +130,7 @@ osi_VM_StoreAllSegments(struct vcache *avc)
|
|||||||
|
|
||||||
obj = vp->v_object;
|
obj = vp->v_object;
|
||||||
|
|
||||||
if (obj != NULL && (obj->flags & OBJ_MIGHTBEDIRTY) != 0) {
|
if (obj != NULL && AFS_VM_OBJECT_MIGHTBEDIRTY(obj)) {
|
||||||
ReleaseWriteLock(&avc->lock);
|
ReleaseWriteLock(&avc->lock);
|
||||||
AFS_GUNLOCK();
|
AFS_GUNLOCK();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user