]> git.baikalelectronics.ru Git - kernel.git/commit
fsnotify: get rid of fsnotify_destroy_mark_locked()
authorJan Kara <jack@suse.com>
Fri, 4 Sep 2015 22:43:12 +0000 (15:43 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 4 Sep 2015 23:54:41 +0000 (16:54 -0700)
commit03287f5c732d7587c840a8d4d575105eb2d6d6f6
treeb6b4bf48018d23c180cb7407ea1ff58402664e5c
parente6fce1b231393c3a050691077a1da4e1416947a6
fsnotify: get rid of fsnotify_destroy_mark_locked()

fsnotify_destroy_mark_locked() is subtle to use because it temporarily
releases group->mark_mutex.  To avoid future problems with this
function, split it into two.

fsnotify_detach_mark() is the part that needs group->mark_mutex and
fsnotify_free_mark() is the part that must be called outside of
group->mark_mutex.  This way it's much clearer what's going on and we
also avoid some pointless acquisitions of group->mark_mutex.

Signed-off-by: Jan Kara <jack@suse.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/notify/dnotify/dnotify.c
fs/notify/fanotify/fanotify_user.c
fs/notify/mark.c
include/linux/fsnotify_backend.h