summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorHeiko Carstens <heiko.carstens@de.ibm.com>2009-11-22 10:05:19 +0100
committerEric Paris <eparis@redhat.com>2009-11-24 08:29:06 -0500
commit162308729bc6d196ae1d1b8225e407175785e931 (patch)
treed8cc9566800de55593a0910b788eb554a2653f9f /fs
parentf1604718da2f21c17b1ce4cd092ab8011c25526e (diff)
fanotify: CONFIG_HAVE_SYSCALL_WRAPPERS for sys_fanotify_mark
Please note that you need the patch below in addition, otherwise the syscall wrapper stuff won't work on those 32 bit architectures which enable the wrappers. When enabled the syscall wrapper defines always take long parameters and then cast them to whatever is needed. This approach doesn't work for the 32 bit case where the original syscall takes a long long parameter, since we would lose the upper 32 bits. So syscalls with 64 bit arguments are special cases wrt to syscall wrappers and enp up in the ugliness below (see also sys_fallocate). In addition these special cased syscall wrappers have the drawback that ftrace syscall tracing doesn't work on them, since they don't get defined by using the usual macros. Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/notify/fanotify/fanotify_user.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c
index c8f1604b7955..c5f59d8b70a4 100644
--- a/fs/notify/fanotify/fanotify_user.c
+++ b/fs/notify/fanotify/fanotify_user.c
@@ -473,8 +473,9 @@ out_put_group:
return fd;
}
-SYSCALL_DEFINE5(fanotify_mark, int, fanotify_fd, unsigned int, flags,
- __u64, mask, int, dfd, const char __user *, pathname)
+SYSCALL_DEFINE(fanotify_mark)(int fanotify_fd, unsigned int flags,
+ __u64 mask, int dfd,
+ const char __user * pathname)
{
struct inode *inode;
struct fsnotify_group *group;
@@ -518,6 +519,17 @@ fput_and_out:
return ret;
}
+#ifdef CONFIG_HAVE_SYSCALL_WRAPPERS
+asmlinkage long SyS_fanotify_mark(long fanotify_fd, long flags, __u64 mask,
+ long dfd, long pathname)
+{
+ return SYSC_fanotify_mark((int) fanotify_fd, (unsigned int) flags,
+ mask, (int) dfd,
+ (const char __user *) pathname);
+}
+SYSCALL_ALIAS(sys_fanotify_mark, SyS_fanotify_mark);
+#endif
+
/*
* fanotify_user_setup - Our initialization function. Note that we cannnot return
* error because we have compiled-in VFS hooks. So an (unlikely) failure here