mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 07:12:09 +00:00
fsnotify: use a mutex instead of a spinlock to protect a groups mark list
Replaces the groups mark_lock spinlock with a mutex. Using a mutex instead of a spinlock results in more flexibility (i.e it allows to sleep while the lock is held). Signed-off-by: Lino Sanfilippo <LinoSanfilippo@gmx.de> Signed-off-by: Eric Paris <eparis@redhat.com>
This commit is contained in:
parent
6dfbd14994
commit
986ab09807
5 changed files with 15 additions and 15 deletions
|
@ -141,7 +141,7 @@ struct fsnotify_group {
|
|||
unsigned int priority;
|
||||
|
||||
/* stores all fastpath marks assoc with this group so they can be cleaned on unregister */
|
||||
spinlock_t mark_lock; /* protect marks_list */
|
||||
struct mutex mark_mutex; /* protect marks_list */
|
||||
atomic_t num_marks; /* 1 for each mark and 1 for not being
|
||||
* past the point of no return when freeing
|
||||
* a group */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue