From 0eb9dfebdcdc7d3662b4602b9d9227c52638ce44 Mon Sep 17 00:00:00 2001 From: Zach Brown Date: Fri, 9 Jan 2026 09:15:17 -0800 Subject: [PATCH] Allow forced unmount errors in lock invalidation Lock invalidation has assertions for critical errors, but it doesn't allow the synthetic errors that come from forced unmount severing the client's connection to the world. Signed-off-by: Zach Brown --- kmod/src/lock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kmod/src/lock.c b/kmod/src/lock.c index cb84ce74..63213874 100644 --- a/kmod/src/lock.c +++ b/kmod/src/lock.c @@ -717,14 +717,14 @@ static void lock_invalidate_worker(struct work_struct *work) /* only lock protocol, inv can't call subsystems after shutdown */ if (!linfo->shutdown) { ret = lock_invalidate(sb, lock, nl->old_mode, nl->new_mode); - BUG_ON(ret); + BUG_ON(ret < 0 && ret != -ENOLINK); } /* respond with the key and modes from the request, server might have died */ ret = scoutfs_client_lock_response(sb, ireq->net_id, nl); if (ret == -ENOTCONN) ret = 0; - BUG_ON(ret); + BUG_ON(ret < 0 && ret != -ENOLINK); scoutfs_inc_counter(sb, lock_invalidate_response); }