]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blobdiff - fs/open.c
fs: add ksys_fallocate() wrapper; remove in-kernel calls to sys_fallocate()
[mirror_ubuntu-focal-kernel.git] / fs / open.c
index 2e816fc7bd5613596a623c35c5d77203e7b76018..d0e955b558ad84ce2d6f98f6ccb490185bc36cc2 100644 (file)
--- a/fs/open.c
+++ b/fs/open.c
@@ -333,7 +333,7 @@ int vfs_fallocate(struct file *file, int mode, loff_t offset, loff_t len)
 }
 EXPORT_SYMBOL_GPL(vfs_fallocate);
 
-SYSCALL_DEFINE4(fallocate, int, fd, int, mode, loff_t, offset, loff_t, len)
+int ksys_fallocate(int fd, int mode, loff_t offset, loff_t len)
 {
        struct fd f = fdget(fd);
        int error = -EBADF;
@@ -345,6 +345,11 @@ SYSCALL_DEFINE4(fallocate, int, fd, int, mode, loff_t, offset, loff_t, len)
        return error;
 }
 
+SYSCALL_DEFINE4(fallocate, int, fd, int, mode, loff_t, offset, loff_t, len)
+{
+       return ksys_fallocate(fd, mode, offset, len);
+}
+
 /*
  * access() needs to use the real uid/gid, not the effective uid/gid.
  * We do this by temporarily clearing all FS-related capabilities and