MCPcopy Create free account
hub / github.com/F-Stack/f-stack / cache_trylock_vnodes

Function cache_trylock_vnodes

freebsd/kern/vfs_cache.c:838–855  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

836}
837
838static int
839cache_trylock_vnodes(struct mtx *vlp1, struct mtx *vlp2)
840{
841
842 cache_sort_vnodes(&vlp1, &vlp2);
843
844 if (vlp1 != NULL) {
845 if (!mtx_trylock(vlp1))
846 return (EAGAIN);
847 }
848 if (!mtx_trylock(vlp2)) {
849 if (vlp1 != NULL)
850 mtx_unlock(vlp1);
851 return (EAGAIN);
852 }
853
854 return (0);
855}
856
857static void
858cache_lock_vnodes(struct mtx *vlp1, struct mtx *vlp2)

Callers 1

cache_zap_locked_bucketFunction · 0.85

Calls 1

mtx_unlockFunction · 0.70

Tested by

no test coverage detected