Messages in this thread Patch in this message | | | From | Eric Paris <> | Subject | [PATCH =-v3 17/21] fanotify: add option to clear all fastpaths | Date | Wed, 12 Nov 2008 11:11:56 -0500 |
| |
fanotify users because of a change in decision policy may need to clear all fastpath entries. This simply adds a new setsockopt call which will do exactly that.
Signed-off-by: Eric Paris <eparis@redhat.com> ---
include/linux/fanotify.h | 1 + net/fanotify/af_fanotify.c | 3 +++ 2 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/include/linux/fanotify.h b/include/linux/fanotify.h index 14ad6f9..b7ab01f 100644 --- a/include/linux/fanotify.h +++ b/include/linux/fanotify.h @@ -89,6 +89,7 @@ struct fanotify_so_access { /* fanotify setsockopt optvals */ #define FANOTIFY_SET_FASTPATH 1 #define FANOTIFY_SEND_RESPONSE 2 +#define FANOTIFY_CLEAR_ALL_FASTPATH 3 #ifdef __KERNEL__ diff --git a/net/fanotify/af_fanotify.c b/net/fanotify/af_fanotify.c index eef7e2a..7c98a22 100644 --- a/net/fanotify/af_fanotify.c +++ b/net/fanotify/af_fanotify.c @@ -192,6 +192,9 @@ static int fan_setsockopt(struct socket *sock, int level, int optname, char __us return ret; ret = fanotify_process_access_response(group, data.access.cookie, data.access.response); break; + case FANOTIFY_CLEAR_ALL_FASTPATH: + fanotify_fastpath_clear_group(group); + break; default: return -ENOPROTOOPT; }
| |