]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
fanotify: remove outgoing function checks in fanotify.h
authorAndreas Gruenbacher <agruen@suse.de>
Fri, 18 Dec 2009 02:24:29 +0000 (21:24 -0500)
committerEric Paris <eparis@redhat.com>
Wed, 28 Jul 2010 13:58:59 +0000 (09:58 -0400)
A number of validity checks on outgoing data are done in static inlines but
are only used in one place.  Instead just do them where they are used for
readability.

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>
Signed-off-by: Eric Paris <eparis@redhat.com>
fs/notify/fanotify/fanotify.c
fs/notify/fanotify/fanotify.h [deleted file]
fs/notify/fanotify/fanotify_user.c

index 202be8adb2ec6e3f6f5950e4c57b4ac32382e55f..f6900022f69e352f921a4481b5520d4b362a81a4 100644 (file)
@@ -1,3 +1,4 @@
+#include <linux/fanotify.h>
 #include <linux/fdtable.h>
 #include <linux/fsnotify_backend.h>
 #include <linux/init.h>
@@ -5,8 +6,6 @@
 #include <linux/mount.h>
 #include <linux/types.h>
 
-#include "fanotify.h"
-
 static bool should_merge(struct fsnotify_event *old, struct fsnotify_event *new)
 {
        pr_debug("%s: old=%p new=%p\n", __func__, old, new);
diff --git a/fs/notify/fanotify/fanotify.h b/fs/notify/fanotify/fanotify.h
deleted file mode 100644 (file)
index 4d5723a..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-#include <linux/fanotify.h>
-#include <linux/fsnotify_backend.h>
-#include <linux/net.h>
-#include <linux/kernel.h>
-#include <linux/types.h>
-
-extern const struct fsnotify_ops fanotify_fsnotify_ops;
-
-static inline __u32 fanotify_outgoing_mask(__u32 mask)
-{
-       return mask & FAN_ALL_OUTGOING_EVENTS;
-}
index 618867e4d30f601f3b1ce30c07d120d325dc73e2..84155841a0256fb6481d91557c67187e3f6c200a 100644 (file)
@@ -1,3 +1,4 @@
+#include <linux/fanotify.h>
 #include <linux/fcntl.h>
 #include <linux/file.h>
 #include <linux/fs.h>
@@ -14,7 +15,7 @@
 
 #include <asm/ioctls.h>
 
-#include "fanotify.h"
+extern const struct fsnotify_ops fanotify_fsnotify_ops;
 
 static struct kmem_cache *fanotify_mark_cache __read_mostly;
 
@@ -102,7 +103,7 @@ static ssize_t fill_event_metadata(struct fsnotify_group *group,
 
        metadata->event_len = FAN_EVENT_METADATA_LEN;
        metadata->vers = FANOTIFY_METADATA_VERSION;
-       metadata->mask = fanotify_outgoing_mask(event->mask);
+       metadata->mask = event->mask & FAN_ALL_OUTGOING_EVENTS;
        metadata->pid = pid_vnr(event->tgid);
        metadata->fd = create_fd(group, event);