]> git.baikalelectronics.ru Git - kernel.git/commit
fsnotify: Provide framework for dropping SRCU lock in ->handle_event
authorJan Kara <jack@suse.cz>
Thu, 10 Nov 2016 15:02:11 +0000 (16:02 +0100)
committerJan Kara <jack@suse.cz>
Mon, 10 Apr 2017 15:37:36 +0000 (17:37 +0200)
commitea50a8cd5bcd7fa0e5d805ceed41fe5432e20fe2
treea7e18bc2c8229a8a634d899445c33958f8967876
parent397eb31dcabfd070c83d0daa847c2ee07c0157cc
fsnotify: Provide framework for dropping SRCU lock in ->handle_event

fanotify wants to drop fsnotify_mark_srcu lock when waiting for response
from userspace so that the whole notification subsystem is not blocked
during that time. This patch provides a framework for safely getting
mark reference for a mark found in the object list which pins the mark
in that list. We can then drop fsnotify_mark_srcu, wait for userspace
response and then safely continue iteration of the object list once we
reaquire fsnotify_mark_srcu.

Reviewed-by: Miklos Szeredi <mszeredi@redhat.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/notify/fsnotify.h
fs/notify/group.c
fs/notify/mark.c
include/linux/fsnotify_backend.h