Re: [PATCH v2] drivers/staging/exfat: Replace binary semaphores for mutexes

From: Valdis KlÄtnieks
Date: Wed Oct 30 2019 - 11:41:08 EST


On Wed, 30 Oct 2019 07:49:16 -0700, Davidlohr Bueso said:
> At a slight footprint cost (24 vs 32 bytes), mutexes are more optimal
> than semaphores; it's also a nicer interface for mutual exclusion,
> which is why they are encouraged over binary semaphores, when possible.
>
> For both v_sem and z_sem, their semantics imply traditional lock
> ownership; that is, the lock owner is the same for both lock/unlock
> operations. Therefore it is safe to convert.
>
> Signed-off-by: Davidlohr Bueso <dave@xxxxxxxxxxxx>

Looks sane.

Acked-by: Valdis Kletnieks <valdis.kletnieks@xxxxxx>