On Tue, Jun 03, 2025 at 10:30:30AM +0530, Aneesh Kumar K.V wrote: > static struct mutex *vdev_lock(struct iommufd_vdevice *vdev) > { > if (mutex_lock_interruptible(&vdev->mutex) != 0) > return NULL; > return &vdev->mutex; > } > DEFINE_FREE(vdev_unlock, struct mutex *, if (_T) mutex_unlock(_T)) Dn't do things like this. We already have scoped_cond_guard(mutex_intr) for this pattern and there was a big debate about its design. It doesn't make alot of sense to use that here, this is a place where you should not use cleanup.h. Jason