Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2b891026 authored by Al Viro's avatar Al Viro
Browse files

fhandle: move compat syscalls from compat.c



Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent e35d49f6
Loading
Loading
Loading
Loading
+0 −12
Original line number Original line Diff line number Diff line
@@ -310,15 +310,3 @@ COMPAT_SYSCALL_DEFINE5(mount, const char __user *, dev_name,
 out:
 out:
	return retval;
	return retval;
}
}

#ifdef CONFIG_FHANDLE
/*
 * Exactly like fs/open.c:sys_open_by_handle_at(), except that it
 * doesn't set the O_LARGEFILE flag.
 */
COMPAT_SYSCALL_DEFINE3(open_by_handle_at, int, mountdirfd,
			     struct file_handle __user *, handle, int, flags)
{
	return do_handle_open(mountdirfd, handle, flags);
}
#endif
+13 −0
Original line number Original line Diff line number Diff line
@@ -9,6 +9,7 @@
#include <linux/fsnotify.h>
#include <linux/fsnotify.h>
#include <linux/personality.h>
#include <linux/personality.h>
#include <linux/uaccess.h>
#include <linux/uaccess.h>
#include <linux/compat.h>
#include "internal.h"
#include "internal.h"
#include "mount.h"
#include "mount.h"


@@ -264,3 +265,15 @@ SYSCALL_DEFINE3(open_by_handle_at, int, mountdirfd,
	ret = do_handle_open(mountdirfd, handle, flags);
	ret = do_handle_open(mountdirfd, handle, flags);
	return ret;
	return ret;
}
}

#ifdef CONFIG_COMPAT
/*
 * Exactly like fs/open.c:sys_open_by_handle_at(), except that it
 * doesn't set the O_LARGEFILE flag.
 */
COMPAT_SYSCALL_DEFINE3(open_by_handle_at, int, mountdirfd,
			     struct file_handle __user *, handle, int, flags)
{
	return do_handle_open(mountdirfd, handle, flags);
}
#endif
+0 −2
Original line number Original line Diff line number Diff line
@@ -108,8 +108,6 @@ extern struct file *do_filp_open(int dfd, struct filename *pathname,
extern struct file *do_file_open_root(struct dentry *, struct vfsmount *,
extern struct file *do_file_open_root(struct dentry *, struct vfsmount *,
		const char *, const struct open_flags *);
		const char *, const struct open_flags *);


extern long do_handle_open(int mountdirfd,
			   struct file_handle __user *ufh, int open_flag);
extern int open_check_o_direct(struct file *f);
extern int open_check_o_direct(struct file *f);
extern int vfs_open(const struct path *, struct file *, const struct cred *);
extern int vfs_open(const struct path *, struct file *, const struct cred *);
extern struct file *filp_clone_open(struct file *);
extern struct file *filp_clone_open(struct file *);