-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously vnode was not locked there, unlike Linux. It required locking it in vn_flush_cached_data(), which recursed on the lock if called from zfs_clone_range(), having the vnode locked. Reviewed-by: Alan Somers <asomers@gmail.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Alexander Motin <mav@FreeBSD.org> Sponsored by: iXsystems, Inc. Closes #16789 Closes #16796
- Loading branch information
Showing
2 changed files
with
4 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -91,20 +91,16 @@ vn_is_readonly(vnode_t *vp) | |
((vp)->v_object != NULL && \ | ||
(vp)->v_object->resident_page_count > 0) | ||
|
||
#ifndef IN_BASE | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
amotin
Author
Member
|
||
static __inline void | ||
vn_flush_cached_data(vnode_t *vp, boolean_t sync) | ||
{ | ||
if (vm_object_mightbedirty(vp->v_object)) { | ||
int flags = sync ? OBJPC_SYNC : 0; | ||
vn_lock(vp, LK_SHARED | LK_RETRY); | ||
zfs_vmobject_wlock(vp->v_object); | ||
vm_object_page_clean(vp->v_object, 0, 0, flags); | ||
zfs_vmobject_wunlock(vp->v_object); | ||
VOP_UNLOCK(vp); | ||
} | ||
} | ||
#endif | ||
|
||
#define vn_exists(vp) do { } while (0) | ||
#define vn_invalid(vp) do { } while (0) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@amotin by removing the IN_BASE ifndef this doesn't build in base userland anymore