aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2013-03-05 20:10:59 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2013-05-09 13:46:38 -0400
commit91c2e0bcae72a3086c698b5de2b950b885abb0e6 (patch)
tree89f738ca8f9519f0fd3b22dd6cfb3dc69d98cfab /fs
parent5522ddb3fc0dfd4a503c8278eafd88c9f2d3fada (diff)
unify compat fanotify_mark(2), switch to COMPAT_SYSCALL_DEFINE
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs')
-rw-r--r--fs/notify/fanotify/fanotify_user.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c
index d0be29fa94cf..6c80083a984f 100644
--- a/fs/notify/fanotify/fanotify_user.c
+++ b/fs/notify/fanotify/fanotify_user.c
@@ -13,6 +13,7 @@
13#include <linux/slab.h> 13#include <linux/slab.h>
14#include <linux/types.h> 14#include <linux/types.h>
15#include <linux/uaccess.h> 15#include <linux/uaccess.h>
16#include <linux/compat.h>
16 17
17#include <asm/ioctls.h> 18#include <asm/ioctls.h>
18 19
@@ -857,6 +858,22 @@ fput_and_out:
857 return ret; 858 return ret;
858} 859}
859 860
861#ifdef CONFIG_COMPAT
862COMPAT_SYSCALL_DEFINE6(fanotify_mark,
863 int, fanotify_fd, unsigned int, flags,
864 __u32, mask0, __u32, mask1, int, dfd,
865 const char __user *, pathname)
866{
867 return sys_fanotify_mark(fanotify_fd, flags,
868#ifdef __BIG_ENDIAN
869 ((__u64)mask1 << 32) | mask0,
870#else
871 ((__u64)mask0 << 32) | mask1,
872#endif
873 dfd, pathname);
874}
875#endif
876
860/* 877/*
861 * fanotify_user_setup - Our initialization function. Note that we cannot return 878 * fanotify_user_setup - Our initialization function. Note that we cannot return
862 * error because we have compiled-in VFS hooks. So an (unlikely) failure here 879 * error because we have compiled-in VFS hooks. So an (unlikely) failure here