]> git.proxmox.com Git - mirror_zfs.git/blobdiff - module/zfs/zfs_sa.c
Simplify threads, mutexs, cvs and rwlocks
[mirror_zfs.git] / module / zfs / zfs_sa.c
index 13e99c0587f5a0d21ff47435099554a45de33338..08e881cc372dea0277fac5e2fbbb218589987b56 100644 (file)
@@ -300,7 +300,7 @@ zfs_sa_upgrade(sa_handle_t *hdl, dmu_tx_t *tx)
         * Otherwise, we know we are doing the
         * sa_update() that caused us to enter this function.
         */
-       if (mutex_owner(&zp->z_lock) != curthread) {
+       if (MUTEX_NOT_HELD(&zp->z_lock)) {
                if (mutex_tryenter(&zp->z_lock) == 0)
                        return;
                else