fs: add do_faccessat() helper and ksys_access() wrapper; remove in-kernel calls to...
[linux-block.git] / fs / open.c
index 6037f2bf418ce6477a54db0ed425fcf12b4fb02e..0fc8188be31a46b3f46b6bd512817070e198d2e7 100644 (file)
--- a/fs/open.c
+++ b/fs/open.c
@@ -350,7 +350,7 @@ SYSCALL_DEFINE4(fallocate, int, fd, int, mode, loff_t, offset, loff_t, len)
  * We do this by temporarily clearing all FS-related capabilities and
  * switching the fsuid/fsgid around to the real ones.
  */
-SYSCALL_DEFINE3(faccessat, int, dfd, const char __user *, filename, int, mode)
+long do_faccessat(int dfd, const char __user *filename, int mode)
 {
        const struct cred *old_cred;
        struct cred *override_cred;
@@ -426,9 +426,14 @@ out:
        return res;
 }
 
+SYSCALL_DEFINE3(faccessat, int, dfd, const char __user *, filename, int, mode)
+{
+       return do_faccessat(dfd, filename, mode);
+}
+
 SYSCALL_DEFINE2(access, const char __user *, filename, int, mode)
 {
-       return sys_faccessat(AT_FDCWD, filename, mode);
+       return do_faccessat(AT_FDCWD, filename, mode);
 }
 
 int ksys_chdir(const char __user *filename)