Re: [PATCH] nilfs2: fix checkpoint root lifetime on sysfs errors

From: Aldo Ariel Panzardo

Date: Tue Sep 15 2026 - 15:44:39 EST


Hi Slava,

You're right, the extra mutex is unnecessary. I checked and all
callers of ns_cptree_lock are in process context, so converting it
to a mutex is safe. nilfs_put_root() can then use
refcount_dec_and_mutex_lock() instead of refcount_dec_and_lock().

I'll send a v2 that replaces the spinlock with a mutex rather than
adding a second lock.

Thanks for the review,
Aldo