lkml.org 
[lkml]   [2014]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 1/1] Fanotify: make default values visible
Date
From: Heinrich Schuchardt <xypron.glpk@gmx.de>

The fanotify API imposes limits on
number of queue entries
number of queues
number of listeners.

Opaque limits lead to unnecessary redefinitions in user coding.
Limits should therefore be visible in includes or should be removed.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
---
fs/notify/fanotify/fanotify_user.c | 4 ----
include/uapi/linux/fanotify.h | 5 +++++
2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c
index 287a22c..cf7465e 100644
--- a/fs/notify/fanotify/fanotify_user.c
+++ b/fs/notify/fanotify/fanotify_user.c
@@ -21,10 +21,6 @@
#include "../fdinfo.h"
#include "fanotify.h"

-#define FANOTIFY_DEFAULT_MAX_EVENTS 16384
-#define FANOTIFY_DEFAULT_MAX_MARKS 8192
-#define FANOTIFY_DEFAULT_MAX_LISTENERS 128
-
extern const struct fsnotify_ops fanotify_fsnotify_ops;

static struct kmem_cache *fanotify_mark_cache __read_mostly;
diff --git a/include/uapi/linux/fanotify.h b/include/uapi/linux/fanotify.h
index 030508d..07f73ff 100644
--- a/include/uapi/linux/fanotify.h
+++ b/include/uapi/linux/fanotify.h
@@ -3,6 +3,11 @@

#include <linux/types.h>

+/* default limits */
+#define FANOTIFY_DEFAULT_MAX_EVENTS 16384
+#define FANOTIFY_DEFAULT_MAX_MARKS 8192
+#define FANOTIFY_DEFAULT_MAX_LISTENERS 128
+
/* the following events that user-space can register for */
#define FAN_ACCESS 0x00000001 /* File was accessed */
#define FAN_MODIFY 0x00000002 /* File was modified */
--
1.7.10.4


\
 
 \ /
  Last update: 2014-03-14 23:41    [W:0.030 / U:1.312 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site