summaryrefslogtreecommitdiffstats
path: root/fs/notify
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2018-03-13 16:27:21 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2018-04-02 14:15:45 -0400
commitd0d89d1ed3ff7e39d80773be09918037d06522fb (patch)
tree15285a15fd6717c67777ea25e131ca702296b902 /fs/notify
parentab641afa73fbcdee962c4ec9641dd561fdae9944 (diff)
inotify: add do_inotify_init() helper; remove in-kernel call to syscall
Using the inotify-internal do_inotify_init() helper allows us to get rid of the in-kernel call to sys_inotify_init1() syscall. This patch is part of a series which removes in-kernel calls to syscalls. On this basis, the syscall entry path can be streamlined. For details, see http://lkml.kernel.org/r/20180325162527.GA17492@light.dominikbrodowski.net Acked-by: Jan Kara <jack@suse.cz> Cc: Amir Goldstein <amir73il@gmail.com> Cc: linux-fsdevel@vger.kernel.org Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'fs/notify')
-rw-r--r--fs/notify/inotify/inotify_user.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c
index 2c908b31d6c9..43c23653ce2e 100644
--- a/fs/notify/inotify/inotify_user.c
+++ b/fs/notify/inotify/inotify_user.c
@@ -635,7 +635,7 @@ static struct fsnotify_group *inotify_new_group(unsigned int max_events)
635 635
636 636
637/* inotify syscalls */ 637/* inotify syscalls */
638SYSCALL_DEFINE1(inotify_init1, int, flags) 638static int do_inotify_init(int flags)
639{ 639{
640 struct fsnotify_group *group; 640 struct fsnotify_group *group;
641 int ret; 641 int ret;
@@ -660,9 +660,14 @@ SYSCALL_DEFINE1(inotify_init1, int, flags)
660 return ret; 660 return ret;
661} 661}
662 662
663SYSCALL_DEFINE1(inotify_init1, int, flags)
664{
665 return do_inotify_init(flags);
666}
667
663SYSCALL_DEFINE0(inotify_init) 668SYSCALL_DEFINE0(inotify_init)
664{ 669{
665 return sys_inotify_init1(0); 670 return do_inotify_init(0);
666} 671}
667 672
668SYSCALL_DEFINE3(inotify_add_watch, int, fd, const char __user *, pathname, 673SYSCALL_DEFINE3(inotify_add_watch, int, fd, const char __user *, pathname,