> @@ -1508,7 +1509,15 @@ exi_cache_trim(struct exportinfo *exi)
>                * used for NFSAUTH_CACHE_TRIM seconds.
>                */
>               for (c = avl_first(tree); c != NULL; c = AVL_NEXT(tree, c)) {
> -                     rw_enter(&c->authc_lock, RW_WRITER);
> +                     /*
> +                      * We are being called by the kmem subsystem to reclaim
> +                      * memory so don't block if we can't get the lock.
> +                      */
> +                     if (rw_tryenter(&exi->exi_cache_lock, RW_WRITER) == 0) {
> +                             exi_cache_auth_reclaim_failed++;
> +                             return;

Also, do you want to return() on one authc lock?  Or just continue and try the 
next 'c'?

---
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/38/files#r45081235
_______________________________________________
developer mailing list
[email protected]
http://lists.open-zfs.org/mailman/listinfo/developer

Reply via email to