linux/fs/statfs.c

// SPDX-License-Identifier: GPL-2.0
#include <linux/syscalls.h>
#include <linux/export.h>
#include <linux/fs.h>
#include <linux/file.h>
#include <linux/mount.h>
#include <linux/namei.h>
#include <linux/statfs.h>
#include <linux/security.h>
#include <linux/uaccess.h>
#include <linux/compat.h>
#include "internal.h"

static int flags_by_mnt(int mnt_flags)
{}

static int flags_by_sb(int s_flags)
{}

static int calculate_f_flags(struct vfsmount *mnt)
{}

static int statfs_by_dentry(struct dentry *dentry, struct kstatfs *buf)
{}

int vfs_get_fsid(struct dentry *dentry, __kernel_fsid_t *fsid)
{}
EXPORT_SYMBOL();

int vfs_statfs(const struct path *path, struct kstatfs *buf)
{}
EXPORT_SYMBOL();

int user_statfs(const char __user *pathname, struct kstatfs *st)
{}

int fd_statfs(int fd, struct kstatfs *st)
{}

static int do_statfs_native(struct kstatfs *st, struct statfs __user *p)
{}

static int do_statfs64(struct kstatfs *st, struct statfs64 __user *p)
{}

SYSCALL_DEFINE2(statfs, const char __user *, pathname, struct statfs __user *, buf)
{}

SYSCALL_DEFINE3(statfs64, const char __user *, pathname, size_t, sz, struct statfs64 __user *, buf)
{}

SYSCALL_DEFINE2(fstatfs, unsigned int, fd, struct statfs __user *, buf)
{}

SYSCALL_DEFINE3(fstatfs64, unsigned int, fd, size_t, sz, struct statfs64 __user *, buf)
{}

static int vfs_ustat(dev_t dev, struct kstatfs *sbuf)
{}

SYSCALL_DEFINE2(ustat, unsigned, dev, struct ustat __user *, ubuf)
{}

#ifdef CONFIG_COMPAT
static int put_compat_statfs(struct compat_statfs __user *ubuf, struct kstatfs *kbuf)
{}

/*
 * The following statfs calls are copies of code from fs/statfs.c and
 * should be checked against those from time to time
 */
COMPAT_SYSCALL_DEFINE2(statfs, const char __user *, pathname, struct compat_statfs __user *, buf)
{}

COMPAT_SYSCALL_DEFINE2(fstatfs, unsigned int, fd, struct compat_statfs __user *, buf)
{}

static int put_compat_statfs64(struct compat_statfs64 __user *ubuf, struct kstatfs *kbuf)
{}

int kcompat_sys_statfs64(const char __user * pathname, compat_size_t sz, struct compat_statfs64 __user * buf)
{}

COMPAT_SYSCALL_DEFINE3(statfs64, const char __user *, pathname, compat_size_t, sz, struct compat_statfs64 __user *, buf)
{}

int kcompat_sys_fstatfs64(unsigned int fd, compat_size_t sz, struct compat_statfs64 __user * buf)
{}

COMPAT_SYSCALL_DEFINE3(fstatfs64, unsigned int, fd, compat_size_t, sz, struct compat_statfs64 __user *, buf)
{}

/*
 * This is a copy of sys_ustat, just dealing with a structure layout.
 * Given how simple this syscall is that apporach is more maintainable
 * than the various conversion hacks.
 */
COMPAT_SYSCALL_DEFINE2(ustat, unsigned, dev, struct compat_ustat __user *, u)
{}
#endif