diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -3293,9 +3293,15 @@ case LK_EXCLUSIVE: break; case LK_EXCLOTHER: + /* Don't wait now for the lock to be freed since this + * could cause LORs depending on which other vnodes are + * locked. */ + error = EAGAIN; + break; case 0: want_unlock = true; - error = vn_lock(vp, LK_EXCLUSIVE | LK_INTERLOCK); + error = vn_lock(vp, LK_EXCLUSIVE | LK_INTERLOCK | + LK_NOWAIT); VI_LOCK(vp); break; default: