lkml.org 
[lkml]   [2011]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/7] fsnotify: use a groups mark_mutex to synchronize access to its mark list
Date
This patch series eliminates the need for the fsnotify group mutex which is
currently needed to ensure race free addition and removal to groups mark lists.
For this reason the locking order required to add or remove marks is turned from

1. mark lock
2. group mark_lock
3. inode/vfsmount lock

to

1. group mark_lock
2. mark lock
3. inode/vfsmount lock

Furthermore the group mark lock is turned from a spin lock to a mutex.
The patches apply against commit ef9bf3b7144bee6ce1da5616015cabc8771206af of
branch 'origin/for-next' from git.infradead.org/users/eparis/notify.git


[PATCH 1/7] fsnotify: take groups mark_lock before mark lock
Change locking order (see above).

[PATCH 2/7] fanotify: add an extra flag to mark_remove_from_mask that indicates wheather a mark could be destroyed
Add an extra flag to mark_remove_from_mask that indicates whether a mark could
be destroyed. This is in preparation for the next patches.

[PATCH 3/7] fsnotify: introduce fsnotify_remove_mark()
Introduce a new function fsnotify_remove_mark() which is a counterpart to
fsnotify_add_mark().

[PATCH 4/7] fsnotify: replace most calls of fsnotify_destroy_mark() with fsnotify_remove_mark()
Replace calls to fsnotify_destroy_mark() with calls to fsnotify_remove_mark().
This concerns all calls to destroy_mark() with exception of the ones called from
a disappearing fsobject.

[PATCH 5/7] fsnotify: use a mutex instead of a spinlock to protect a groups mark list
Turn the mark_list spinlock into a mutex.

[PATCH 6/7] fsnotify: introduce locked versions of fsnotify_add_mark() and fsnotify_remove_mark()
Introduced _locked versions of fsnotify_[add|remove]_mark that assume that the
mark list mutex is already held. This enables the caller to do custom tasks
while the mark list is protected.

[PATCH 7/7] fsnotify: replace the groups mutex with the groups mark list mutex
Replace the group mutex with the mark_list mutex and call the _locked() version of
fsnotify_[add|remove]_mark() while the mutex is held.




\
 
 \ /
  Last update: 2011-02-11 11:43    [W:0.041 / U:0.300 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site