From: Andreas Gruenbacher Date: Fri, 18 Dec 2009 02:24:29 +0000 (-0500) Subject: fanotify: remove outgoing function checks in fanotify.h X-Git-Tag: v2.6.36-rc1~303^2~54 X-Git-Url: http://bbs.cooldavid.org/git/?a=commitdiff_plain;h=33d3dfff451a2ab6fe2f6aaabed9b24e91aad109;p=net-next-2.6.git fanotify: remove outgoing function checks in fanotify.h 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 Signed-off-by: Eric Paris --- diff --git a/fs/notify/fanotify/fanotify.c b/fs/notify/fanotify/fanotify.c index 202be8adb2e..f6900022f69 100644 --- a/fs/notify/fanotify/fanotify.c +++ b/fs/notify/fanotify/fanotify.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -5,8 +6,6 @@ #include #include -#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 index 4d5723a74a8..00000000000 --- a/fs/notify/fanotify/fanotify.h +++ /dev/null @@ -1,12 +0,0 @@ -#include -#include -#include -#include -#include - -extern const struct fsnotify_ops fanotify_fsnotify_ops; - -static inline __u32 fanotify_outgoing_mask(__u32 mask) -{ - return mask & FAN_ALL_OUTGOING_EVENTS; -} diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c index 618867e4d30..84155841a02 100644 --- a/fs/notify/fanotify/fanotify_user.c +++ b/fs/notify/fanotify/fanotify_user.c @@ -1,3 +1,4 @@ +#include #include #include #include @@ -14,7 +15,7 @@ #include -#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);