From 3ae82f449cea00de5cd894feb8e9154b2da99b4e Mon Sep 17 00:00:00 2001 From: Davidlohr Bueso Date: Wed, 30 Oct 2019 07:49:16 -0700 Subject: drivers/staging/exfat: Replace binary semaphores for mutexes 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 Acked-by: Valdis Kletnieks Link: https://lore.kernel.org/r/20191030144916.10802-1-dave@stgolabs.net Signed-off-by: Greg Kroah-Hartman --- drivers/staging/exfat/exfat.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/staging/exfat/exfat.h') diff --git a/drivers/staging/exfat/exfat.h b/drivers/staging/exfat/exfat.h index 6142e880f682..acb73f47a253 100644 --- a/drivers/staging/exfat/exfat.h +++ b/drivers/staging/exfat/exfat.h @@ -610,7 +610,7 @@ struct fs_info_t { u32 dev_ejected; /* block device operation error flag */ struct fs_func *fs_func; - struct semaphore v_sem; + struct mutex v_mutex; /* FAT cache */ struct buf_cache_t FAT_cache_array[FAT_CACHE_SIZE]; -- cgit