]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commit
drivers/staging/exfat: Replace more binary semaphores with mutexes
authorDavidlohr Bueso <dave@stgolabs.net>
Fri, 1 Nov 2019 18:53:32 +0000 (11:53 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 2 Nov 2019 10:41:36 +0000 (11:41 +0100)
commit74179976b085398f5ad57b5d8aec8222e08e39dc
treeb75f65e6e5c00ed44fa644e5ff5272860567f2e1
parent8823d99080ba59598f00b7e50b281c46ddd39d56
drivers/staging/exfat: Replace more binary semaphores with 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.
There is also lockdep support.

For both f_sem and b_sem, their semantics imply traditional lock
ownership; that is, the lock owner is the same for both lock/unlock
operations and not under irq contexts (ie for trylock/unlock scenarios).
Therefore it is safe to convert.

Signed-off-by: Davidlohr Bueso <dave@stgolabs.net>
Link: https://lore.kernel.org/r/20191101185332.31786-1-dave@stgolabs.net
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/exfat/exfat_cache.c